I am using a plain vanilla demo script from Uploadifive and attempting to upload a file to a Laravel 5.1 Controller. I can see the successful POST request in the Firebug console in Firefox and the PHP $_FILES global variable contains all the expected data. However, when I try to retrieve data about the file using $request->file()
or Input::file()
and send a JSON response to the client I get an empty object with a property called Filedata like this: {"Filedata":{}}
. I've tried a jQuery plugin and simply get null. How can I upload files with AJAX with the Laravel 5.1 framework?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire