Unable to upload File via REST

I’m trying to upload an Image file (png) but I get the next error:

{“code”:6009,“message”:“Unable to upload file”}

URL: https://api.backendless.com/v1/files/Images/test_image.png
Method: POST

curl -X POST -H “application-id: XXXXXXXXXX” -H “secret-key: XXXXXXXXXX” -H “application-type: REST” -H “Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW” -H “user-token: XXXXXXXXXX” -H “Cache-Control: no-cache” -H “Postman-Token: XXXXXXXXXX” -F “upload=@test_image.png” “https://api.backendless.com/v1/files/Images/test_image.png

Any ideas? Thanks

try to use the exact example from documentation https://backendless.com/documentation/files/rest/files_file_upload.htm

Thanks for your response. That’s exactly what I have done, follow the example from the documentation.
Maybe I’m doing something wrong?

as I can see your headers are diffrent from headers from example, content-type include extra data. so try this one:

curl -H application-id:[url=https://backendless.com/documentation/files/rest/obtaining_app_id.htm]application-id-value-from-console[/url]-H secret-key:[url=https://backendless.com/documentation/files/rest/obtaining_app_id.htm]secret-key-value-from-console[/url] -H Content-Type:"multipart/form-data" -H application-type:REST --form upload=@test.txt-X POST-v http://api.backendless.com/v1/files/txtfiles/test.txt

You are right, I was using Postman REST client and it adds that extra data automatically.

The solution is not to specify a Content-Type Header.

It works now, thanks a lot!