cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

File path from URL

File path from URL

chakmangoo
Explorer | Level 4

Hello,

 

Is there any way to get file path from file's URL.

 

Example: If a file - "fileName.m4v" lives inside "folder1/sub-folder1" and its dropboxURL is https://www.dropbox.com/s/something/fileName.m4v?dl=0.

 

I am looking for function/code that takes URL as parameter and returns filePath ("folder1/sub-folder1/fileName.m4v")

1 Accepted Solution

Accepted Solutions

Здравко
Legendary | Level 20

@chakmangoo wrote:

...

I am looking for function/code that takes URL as parameter and returns filePath ("folder1/sub-folder1/fileName.m4v")


Hi @chakmangoo,

It's only possible if the authenticated account is the one that own the shared link. In such a case you can use /2/sharing/get_shared_link_metadata.

Hope this helps.

 

PS: Take in mind that Dropbox non empty path always starts with slash (not directly with the first folder or file name as in your post). The path form, you posted, is invalid!

View solution in original post

1 Reply 1

Здравко
Legendary | Level 20

@chakmangoo wrote:

...

I am looking for function/code that takes URL as parameter and returns filePath ("folder1/sub-folder1/fileName.m4v")


Hi @chakmangoo,

It's only possible if the authenticated account is the one that own the shared link. In such a case you can use /2/sharing/get_shared_link_metadata.

Hope this helps.

 

PS: Take in mind that Dropbox non empty path always starts with slash (not directly with the first folder or file name as in your post). The path form, you posted, is invalid!

Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Здравко Legendary | Level 20
What do Dropbox user levels mean?