We are aware of the issue with the badge emails resending to everyone, we apologise for the inconvenience - learn more here.
Forum Discussion
newBox
3 months agoNew member | Level 2
filesGetTemporaryUploadLink - 404
Hi!
I'm user of dropbox basic and I'm generating upload link but the link following to 404 page.
I have one folder /home/products and one app /Apps/xxx with folder /products
I did try every combination to get proper link but its impossible for me.
here is list of paths witch I did provide
- /products
- /products/somefilename.txt
- /Apps/xxx/
- /Apps/xxx/products
- /Apps/xxx/products/somefiname.txt
what is proper path in my case ? please help
const dbx = new Dropbox({ accessToken: token });
return dbx.filesGetTemporaryUploadLink({duration: 14000, commit_info: {path: '/Apps/xxx/products/text.txt',
"autorename": true,
"mode": "add",
"mute": false,
"strict_conflict": false
}})
- ЗдравкоLegendary | Level 20
newBox wrote:...
I'm user of dropbox basic and I'm generating upload link but the link following to 404 page.
...
Such a link should not follow anywhere! Or you should not expect such a thing at least.
This is one shot link for single use only!!! If even only try open such a link in web browser by simply put it on the address line, that immediately invalidates it (it's consumed already)!
Such a link may be used in post request and this request puts in file, you denoted on link creation, exactly what carries the request body (focus on exactly - if the content is encode somehow in the body, exactly the same will get in the file). Many people get confused by this and think the file becomes damaged.
newBox wrote:...
what is proper path in my case ? ...
Only file paths! There is no way to upload a folder (as is in some of your tries).
You may try start with something relatively simple. Pass as path something like '/test.txt' and change mode to "overwrite". Once you have the new link, execute a code like:
fetch(yourLink, { method: "POST", headers: {"Content-Type": "application/octet-stream"}, body: "hello world" })
Where the variable 'youLink' above is... your link just received before. Once executed, take a look on your Dropbox folder (either online dropbox.com or on the local one). Does there come up a file test.txt? 🤔 What does it contain if so? 🙂
Hope this clarifies the things.
- Greg-DBDropbox Staff
newBox As Здравко noted, you should not attempt to open the temporary upload link directly in a browser; attempting to do so will return a 404 to the GET request.
As for the path, if your app has the "app folder" access type, you should not include the path to the app folder itself in the 'path' value. Dropbox will automatically interpret your path values as relative to the app folder when using an app with the app folder access type. So for example, if you are using an app with an app folder, and want to upload to "/Apps/<app_folder_name>/products/somefilename.txt", you should only specify "/products/somefilename.txt".
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.
5,877 PostsLatest Activity: 12 months agoIf you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X or Facebook.
For more info on available support options for your Dropbox plan, see this article.
If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!