We Want to Hear From You! What Do You Want to See on the Community? Tell us here!
Forum Discussion
anray
9 years agoExplorer | Level 3
RIFF header is removed in uploaded audio file
I upload .wav file to dropbox with the following code in Android app:
DbxRequestConfig config = new DbxRequestConfig("dropbox/java-tutorial", "en_US"); mClient = new DbxClientV2(config, ACCESS_TOKEN); InputStream in = new FileInputStream(filePath); FileMetadata metadata = mClient.files().uploadBuilder("/Folder/" + FILE_NAME).withMode(WriteMode.OVERWRITE) .uploadAndFinish(in); Log.d(TAG, "Upload complete " + metadata.getRev());
And when I compare the files (origianl and uploaded) I can see that RIFF header is missing: https://www.screencast.com/t/6e3TwwypR
And as a result file without header is not reccognized and not played, i.e. corrupted.
Why does the header cut out?
1 Reply
- Greg-DB9 years ago
Dropbox Community Moderator
The Java SDK just uploads whatever raw data is supplied, in this case via the InputStream supplied to the uploadAndFinish method. In your code, that's the "in" variable. Can you try reading that itself and checking whether or not it has the expected data?
About Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.6,036 PostsLatest Activity: 2 days ago
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 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!