I'm trying to upload multiple files and store the name in the database, and the file in the storage/thumbnail folder. The problem is that the move function is not working because the file that has to be moved is empty. However when I DD my results, all images show up.
here's my code:
$files = Input::file('images'); //The array with images
The loop to put all images to the storage folder:
foreach ($files as $file) {
Input::file($file)->move('storage/thumb_nail');
}
When i dd($file) inside the loop it shows the image object like this:
UploadedFile {#30 ▼
-test: false
-originalName: "IMG_0180.JPG"
-mimeType: "image/jpeg"
-size: 1331799
-error: 0
}
Any suggestions?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire