Need to see if your shared folder is taking up space on your dropbox 👨💻? Find out how to check here.
Forum Discussion
jay-8
2 years agoExplorer | Level 3
Upload fails when initiated from a C# webAPI (only)
I am able to upload files all day long using the following code, so I know it works. try
{
var uploaded = await dbx.Files.UploadAsync(
...
jay-8
2 years agoExplorer | Level 3
No. Are there any examples of that anywhere?
Is this still a thing??? It would be helpful. Can't find anything like this now:
https://dropbox.tech/developers/debug-your-dropbox-app-with-app-error-logs
I did finally get something to work. The working code on a web form could start out as a void or async void and worked (The onclick event on a web form can't return anything, so it has to be a void). However, pretty much the same code on a webAPI would not work. I had to make the webAPI async and return a task. Then I had to await the call to the dropbox code. This actually got a file from the server into Dropbox.
Part of the deal here is that I don't need to actually return anything in this. Since it worked when a user was pressing a button, it seemed like it should work when called from the webAPI. That apparently wasn't the case.
And that was compounded by not getting any errors anywhere in the process. Everything seemed to work all the way up to the await dbx.Files.UploadAsync(...
Здравко
2 years agoLegendary | Level 20
jay-8 wrote:No. ...
However you want... but try it. 🤷 It wouldn't bit you. 😁
jay-8 wrote:... Can't find anything like this now:
https://dropbox.tech/developers/debug-your-dropbox-app-with-app-error-logs
...
As far as I know such features are dropped and no more supported.
jay-8 wrote:... Everything seemed to work all the way up to the await dbx.Files.UploadAsync(...
Did you try dump 'uploaded' variable's content?! 🤔 If there is any error, it would be there (or if no error - uploaded file metadata). Something else: Keep in mind that if no WriteMode set and when you try upload to existing file (i.e. try overwrite) - this is error! Do you do such thing?
About Dropbox API Support & Feedback
Find help with the Dropbox API from 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!