Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
amei
5 months agoExplorer | Level 3
Using javascript to upload file to Dropbox
I am developing an html file for our group to do weekly picks online. I have to program working where the users can pick their own games. However I need a place to store and retrieve the information ...
DB-Des
Dropbox Community Moderator
4 months agoErrors from the API are typically accompanied by a message that gives more context about what went wrong. We’ll need to see that message in order to better assist you.
In your code's 'try...catch' block, you are logging the error to your console:
...
catch (error) {
console.error('Error uploading file:', error);
}
...
Looking at your console should provide you more insight into the error you are receiving. One of the properties will be the 'error_summary'.
To further narrow it down, you can console 'error.error' or 'error.error.error_summary'.
amei
4 months agoExplorer | Level 3
I tried your suggestion about error.error in the console. The 1st error description was an expired access token which I refreshed. The 2nd error description was to enable files.content.write, which I enabled. The 3rd error description (latest), shown below :
The following are my app permissions :
- DB-Des4 months ago
Dropbox Community Moderator
If the 'files.content.write' scope was enabled after the access token was generated, you’ll need to generate a new access token. Permission changes don’t apply retroactively to previously issued tokens.
- amei4 months agoExplorer | Level 3
When I updated my access token I received the message below :
But when I looked in the dropbox folder in the app I did not see the file there., however it does appear in recents. Mabye there is a delay as I do see it in the folder a little later. I also notice that my access token expires after a day and I have to keep generating a new one. Is there a way to make it last longer (e.g. one month) ?
About Discuss Dropbox Developer & API
Make connections with other developers
The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.
If 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, Facebook or Instagram.
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!