Your workflow is unique 👨💻 - tell us how you use Dropbox here.
Forum Discussion
afritz a.
8 years agoHelpful | Level 5
Android, uploadBuilder, IllegalArgumentException: Value is null
I have an App named "Android Outliner" with DropBox Api2 integration. One of my customers has an issue while trying to upload a file. fileMetadata = dbxClientV2 .files() .u...
- 8 years ago
You were completely right, Greg. The user's setting told me that the called code was this one instead of the one I told you in the first post:
fileMetadata = dbxClientV2 .files() .uploadBuilder("/" + dropboxDir + "/" + file.getName()) .withAutorename(true) .withMode(WriteMode.update(oldRevision)) .withMute(false) .uploadAndFinish(fileInputStream);I did not cleanup everything correctly after the user changed his sync method from another provider to DropBox and did send a wrong oldRevision.
Thanks for the quick feedback and the accurate suggestion.
Greg-DB
Dropbox Community Moderator
8 years agoafritz a. Is that definitely the exact code that is triggering this error? The code shows you using the "overwrite" write mode, but the error mentions the "update" write mode instead.
Also, for reference, the "/Apps" folder name is localized based on the user's account language, but this doesn't affect the API behavior, as app's with the app folder permission don't need to know that app folder root path. The API automatically converts the root path for these apps to be the app folder on the backend.
afritz a.
8 years agoHelpful | Level 5
Greg-DB wrote:afritz a. Is that definitely the exact code that is triggering this error? The code shows you using the "overwrite" write mode, but the error mentions the "update" write mode instead.
Thanks for the reply.
I will check this but have to ask the customer about a Setting. I will tell you.
- Greg-DB8 years ago
Dropbox Community Moderator
Thanks. For example, I was able to reproduce this using:
.withMode(WriteMode.update(null))
The value passed in to WriteMode.update should be the 'rev' value, not null.
- afritz a.8 years agoHelpful | Level 5
You were completely right, Greg. The user's setting told me that the called code was this one instead of the one I told you in the first post:
fileMetadata = dbxClientV2 .files() .uploadBuilder("/" + dropboxDir + "/" + file.getName()) .withAutorename(true) .withMode(WriteMode.update(oldRevision)) .withMute(false) .uploadAndFinish(fileInputStream);I did not cleanup everything correctly after the user changed his sync method from another provider to DropBox and did send a wrong oldRevision.
Thanks for the quick feedback and the accurate suggestion.
About Dropbox API Support and Feedback
Get help with the Dropbox API from fellow developers and experts.
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!