Support Topics Documentation Slack YouTube Blog

File Uploading error. {"code":8002,"message":"Could not parse request with message: Missing boundary header, status code 400

I use to integrate Backendless inside the Bubble.io.

I get the error:
Raw response for the API
Status code 400
{“code”:8002,“message”:"Could not parse request with message: Missing boundary header, status code 400

URL: https://api.backendless.com/[application-id]/[REST-api-key]/files/[path]/[filename]?overwrite=true
igor

Hello,

For requests with Content-Type “multipart/form-data” the body of the requests must be structured according to the rules of that content type. Your request body as shown in the screenshot is JSON, which is not correct and that’s the reason why request fails.

Regards,
Mark

1 Like

Happy to hear from you! Thanks, will try to change JSON

I have the same error in my python code. How to finish the solution?

{‘code’: 8002, ‘message’: ‘Could not parse request with message: Missing boundary header, status code 400, headers POST /AppID/SecretId/files/faces/87A1A0B1-D51F-478B-9CE7-F16E1B52CC20.jpg?overwrite=true’, ‘errorData’: {}}

Thanks, Mario

Hello @Mario_Ghersi,

I’m not familiar with python, but I guess you should remove explicit setting of header since multipart/form-data header should be set automatically.

Regards,
Stanislaw

Dear @stanislaw.grin

Thanks for your info, I tested and the error was:
TypeError: post_request() missing 1 required positional argument: ‘headers’
Should be necessary.
Mario

Dear @stanislaw.grin

This is the solution for the headers:

headers = { ‘content-type: multipart/form-data’,
‘application-id:’ + APP_ID,
‘secret-key:’ + SECRET_ID,
‘application-type:REST’ }

Now it’ working no headers necessary at the end! @stanislaw.grin

1 Like