Hi guys, as the title says, I'm unable to upload an xlsx file, I can successfully upload other formats as xls, pdf, ppt, etc. but this gives an error in the moment I'm trying to upload it.
The call is via AJAX (jQuery), something like this:
$.ajax({
url: 'https://content.dropboxapi.com/2/files/upload',
type: "POST",
processData: false,
headers: {
"Authorization": token,// My app token
"Dropbox-API-Arg": JSON.stringify(arg),
"Content-Type": "application/octet-stream"
},
data: b64toBlob(f.content, f.type),
success = ...
JSON.stringify(arg) gives:
{"path":"/test_api1425/Base referencia histórica.xlsx","mode":"overwrite","autorename":true,"mute":false}
f.type is "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" (the same for an old xls file).
f.content is a base64 encodede string which I convert to blob before sending.
And the error I get is "POST https://content.dropboxapi.com/2/files/upload 400 (Bad Request)"
As I said, this setup works with any file, except *.xlsx files, since I've seen here in the formus this excel files have some issues, I wonder if this has something to do and if you're able to reproduce it, many thanks for your help.
Cheers,
Gustavo.