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: 

How to download file with windev?

MOUHROUH
Explorer | Level 3

i tested this code but it not work

sToken est une chaîne UNICODE = "my token"
sUrl est une chaîne UNICODE = "https://api-content.dropbox.com:443/2/files/download"
sAgent est une chaîne UNICODE = "API-explorer-client"
sType est une chaîne UNICODE = "application/json"
smylink = "my link in dropbox space"
sAutho est une chaîne UNICODE = "Authorization: Bearer " + sToken + RC +"{""path"":""download""}"

sDestination est une chaine = "my file in private space"

HTTPDestination(sDestination)
res est un booléen=HTTPRequête(sUrl,sAgent,sAutho,smylink ,sType)

 

i got in file :

Error in call to API function "files/download": The request body is supposed to be empty, but it isn't; got "h\x00t\x00t\x00p\x00s\x00:\x00/\x00/\x00d\x00l\x00.\x00d\x00r\x00o\x00p\x00b\x00o\x00x\x00u\x00s\x00e\x00r\x00c\x00o\x00n\x00t\x00e\x00n\x00t\x00.\x00c\x00o\x00m\x00/\x001\x00/\x00v\x00i\x00e\x00w\x00/\x00v\x00z\x00q\x00s\x001\x00j\x00b\x00w\x006\x00"

 

5 Replies 5

Re: How to download file with windev?

Dropboxer
Dropboxer

@MOUHROUH I see that you're trying to use the /2/files/download endpoint to download a file from a Dropbox link. The /2/files/download endpoint is only for downloading files directly from a connected account, not from a link. (The actual error you got when trying to use it is indicating that you submitted data in the HTTP request body, where none was expected.)

Anyway, based on the output, it looks like you have a link of the form 'https://dl.dropboxusercontent.com/1/view/...'. That's an old type of direct link. If you have an active link of that type, you can download from it directly using an HTTPS client, without using the Dropbox API. I.e., issue a GET request to it and if successful, the response body will be the file content.

Re: How to download file with windev?

Dropboxer
Dropboxer

@hady 

يبدو أنك ترى مشكلة مختلفة ، لذا يرجى فتح سلسلة محادثات جديدة تتضمن تفاصيل إضافية حتى نتمكن من مساعدتك:

https://www.dropboxforum.com/t5/forums/postpage/board-id/101000014

---

يرجى إعفاء ترجماتنا. تم إنشاء ترجماتنا باستخدام مترجم على الإنترنت. نحن نرغب في دعم كل لغة ، لكننا غير مجهزين حاليًا للقيام بذلك. هنا هو النسخة الإنجليزية:

---

Please excuse our translations. Our translations were created using an online translator. We'd like to support every language, but we're not currently equipped to do so. Here is the English version:

---

It looks like you are seeing a different issue, so please open a new thread with additional details so we can help:

https://www.dropboxforum.com/t5/forums/postpage/board-id/101000014

Re: How to download file with windev?

MOUHROUH
Explorer | Level 3

How can i do with direct link?

Re: How to download file with windev?

Dropboxer
Dropboxer

If you have a direct link to a file, you can download from it directly using a normal HTTPS request. For instance, using curl, saving the data to a local file, that would look like:

curl URL_HERE -o local_file

Exactly how you do that will depend on what HTTPS client you're using, which isn't specific to the Dropbox API, so I can't offer insight on that.

Re: How to download file with windev?

zmmmmmooooo55
Explorer | Level 3
هلا

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?