2

I am trying to upload a file to Dropbox using XmlHttpRequest, in a QML application. I am getting the following error:

Error in call to API function "files/upload": Bad HTTP "Content-Type" header: "application/octet-stream;charset=UTF-8". Expecting one of "application/octet-stream", "text/plain; charset=dropbox-cors-hack".

I seems that no matter which value I set to the Content-Type request header, it always adds

;charset=UTF-8

to the end.

My test data is simply a string, of which I would like a text file be generated to the user's dropbox folder.

request.send("TestString abcdefg")

How to deal with this issue?

Edit, with regards to the duplicate suspicion: This is a similar issue, however, this particular case, if it can be addressed at all, needs to be addressed within the capabilities of Qt, on the QML javascript side, which has a set of different capabilities than javascript programming for the web, as it is a custom js engine, as far as I understand.

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.