Question

I need to make a POST with a multipart form. I've never ventured into this area so forgive any noobness.

When I POST to the site's route, its normal operation prints out this:

------WebKitFormBoundaryopMDmKAp2SnWwAzI

Content-Disposition: form-data; name="error_url"

I'm currently using a script created by a coworker that utilizes [Node UUID][1] and this is what it puts out:

------FormBoundary-7de21530-68fd-11e3-a14f-37e8c06fffa5

Content-Disposition: form-data; name="error_url"

Naturally, when I POST it doesnt work. I'm assuming its because the IDs at the end are different. Is the site's format a different ID convention? Or at the end of the day, should both be compatible with each other?

Thanks


EDIT:

This is what I have in the content type boundary:

contentType: 'multipart/form-data; boundary=----FormBoundary-7de21530-68fd-11e3-a14f-37e8c06fffa5'

Était-ce utile?

La solution

The header should be:

Content-Type: multipart/form-data; boundary=----FormBoundary-7de21530-68fd-11e3-a14f-37e8c06fffa5

Capitalization isn't significant, but you need a hyphen between content and type. And there shouldn't be any quotes around the rest of the header field.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top