Skip to content

Issue with Downloading Files Using Custom URL Format #952

@dtdat1997

Description

@dtdat1997

Hi everyone,
I am encountering an issue when using the file download function in the following examples:

https://github.com/vgrem/Office365-REST-Python-Client/blob/master/examples/sharepoint/files/download.py
https://github.com/vgrem/Office365-REST-Python-Client/blob/master/examples/sharepoint/files/download_from_url.py

These functions work perfectly with file paths in the format:

"{site_url}/sites/team/Shared Documents/archive/big_buck_bunny.mp4"
"Shared Documents/archive/big_buck_bunny.mp4"

However, they do not work with the following format:

https://tenant.sharepoint.com/:p:/r/sites/sitecollection/_layouts/15/Doc.aspx?sourcedoc=yyyyyy&file=newfilename.pptx

Does the library support downloading files with this link format, or is there a way to convert this URL into a valid file path that will work with the current implementation?

Thank you so much for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions