cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Update: Find information on Dropbox support during COVID-19 here
Close
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

Get downloadable links from a folder

Explorer | Level 3

Hello,

 

 

I would like to use Dropbox so that people could host files into a folder.

For now, they have to share manually each link and put this link in the csv file in order to import files into a website. The import process is done using a plugin called WP All Import that allows files to be downloaded from external URL.

 

Could I use a shared folder that is publicly accessible with the link. Let's say the link is something like: https://www.dropbox.com/sh/0fihswd8yfyczw9/AABt2G9yyP4HDF_SAN-JKG7ca?dl=0

Than create downloadable file link with filename?

 

I heard of /create_shared_link_with_settings endpoint but I can't find any tutorial how to use it.

 

Could you indicate me the way to do this please?

 

Any help would be really appreciated.

7 Replies 7
Highlighted

Re: Get downloadable links from a folder

Dropboxer
Dropboxer
I'm not sure I fully follow your question. Are the users uploading to their own Dropbox accounts? Do you need individual links for each uploaded file, or just each folder?

In any case, the /2/sharing/create_shared_link_with_settings endpoint is the right way to create a shared link for any specific file or folder:

https://www.dropbox.com/developers/documentation/http/documentation#sharing-create_shared_link_with_...

There's an example of calling it via curl in the documentation there.
Highlighted

Re: Get downloadable links from a folder

Explorer | Level 3

Actually, they uploaded files from their accounts in a shared folder.

They need individual links for each file so that import process could work. The URL needs to  start with http or https.

Ideally, I would like a link with the same prefix (the shared folder link) and the filename (i.e: https://www.dropbox.com/sh/AAbbCCEeFF123/myfilename.jpg) so that they don't need to manually generate a shared link for each file.

Highlighted

Re: Get downloadable links from a folder

Helpful | Level 5

The Shared Links have their own "format" so you need to get the metadatada, parse the name and then perform the download and apply that parsed name and file extension. At least that's how I do that using .NET on a fully "apished" (lol) application.

Highlighted

Re: Get downloadable links from a folder

Dropboxer
Dropboxer
You can't programmatically get a shared link for a file just using the shared link for a parent folder in API v2, so you'll need to call /2/sharing/create_shared_link_with_settings for each desired file/folder.
Highlighted

I,iRe: Get downloadable links from a folder

Explorer | Level 3

I'm sorry I really don't unier stand how to use endpoint. Where to load the script? How to use it? Is there a tutorial somewhere?

Also I was thinking about sync dropbox files into a webserver so that I could use the absolute Path of the web Server to get files URL. 

Highlighted

Re: I,iRe: Get downloadable links from a folder

Dropboxer
Dropboxer
What language are you using (e.g., Java, Python, etc.)? If possible we recommend using one of the official SDKs:

https://www.dropbox.com/developers/documentation

They come with guides for getting started.
Highlighted

Re: I,iRe: Get downloadable links from a folder

Explorer | Level 3

Ooops...I really don't know anything about java or python...

Work Smarter with Dropbox

The way we work is changing. Share and discover new ways to work smarter with Dropbox in our community.

Sound good? Let's get started.
Who's talking

Top contributors to this post

What do Dropbox user levels mean?
Need more support?