multipart/form-data vs application/octet-stream

While you don’t intend to send any other data together with the file right now, multipart/form-data would give you the possibility to add additional data later on if this is required (without breaking compatability).

Also multipart/form-data would make it possible to access the REST API directly by submitting an HTML form (see https://stackoverflow.com/a/4526286/693140).

Your API could however support both types by using the client’s content type header to distinguish between them.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)