I am using Laravel 5.6 and dropzone 5.2.0
This is my form:
<form method="post" action="" class="dropzone" id="myAwesomeDropzone" enctype="multipart/form-data">
<div class="fallback">
<input name="file" type="file" />
</div>
</form>
and this is my method:
function uploadSponsors(Request $request)
{
$images = $request->file('file');
return response()->json(['files' => $images], 200);
}
However after I put a file into the dropbox area I get this as the response:
{"files":{}}
I am expecting to see the file(s) listed, but it is just an empty object, what's missing?
I do not have any dropzone javascript code, just the form with the dropzone
class.
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2FfaTeW
via IFTTT
Aucun commentaire:
Enregistrer un commentaire