dimanche 26 février 2017

Single file uploads which aren't multiform/form-data in Laravel 5.4

The Laravel documentation provides pretty detailed documentation about form based uploads. However, the documentation only handles form uploads (multipart/form-data) and nothing about how to handle uploads where the uploaded file is the request body itself (how you may use it for APIs). For example a requests which contains application/zip or application/xml as Content-Type and file itself as the request body. The Illuminate\Http\Request doesn't seem to contain any methods for that either.

In short: How can I handle file uploads which are NOT multipart/form-data requests?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire