You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.
Forum Discussion
sbrownnw
2 years agoExplorer | Level 4
Uploading an update to a file with WriteMode.AsOverwrite mode with Id or Path fails
Hello. I am using the .Net Dropbox.Api (6.37.0) with the following code sample: using Dropbox.Api;
using Dropbox.Api.Files;
using System.Text;
namespace Dropbox
{
internal class Prog...
- 2 years ago
Please use Dropbox.Api.Files.WriteMode.Overwrite.Instance to set the overwrite mode (instead of AsOverwrite).
sbrownnw
Explorer | Level 4
Ok. Strange, but ok.
I tried the similar code and it does not compile with: mode: WriteMode.Update.Instance
And it throws the same exception with: mode: new WriteMode().Update
What do I use for Updating a file?
Greg-DB
2 years agoDropbox Staff
For the update write mode, you need to supply the rev value that you are intending to update, so you would make that like: new WriteMode.Update(result.Rev)
- sbrownnw2 years agoExplorer | Level 4
Thanks
- sbrownnw2 years agoExplorer | Level 4
I still get a compilation error following your example (FileMetadata.Rev is a string):
- Greg-DB2 years agoDropbox Staff
That error is occurring because you're missing the "new" necessary to create that instance. Please add the "new" back like in my message and try again.
About Discuss Dropbox Developer & API
Make connections with other developers
797 PostsLatest Activity: 2 days 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!