php - Laravel 4 / Intervention / Dropzone.js not working with some images -


i using laravel / intervention / dropzone.js upload images site using ajax. problem having images return "error: 500" when uploaded. problem isn't file size, or dimensions, i've tested both of those. problem, believe, lightroom. images fail upload images edited using lightroom. there should doing images (encoding, sending headers) causing this. else works fine. code.

if(input::hasfile('file-upload')) {              $file = input::file('file-upload');               $key = input::get('_uuid');             $img = image::make($file[0]);              $img = image::make($file[0])->widen(500, function ($constraint) {                 $constraint->upsize();             });              $img = image::make($file[0])->heighten(1080, function ($constraint) {                 $constraint->upsize();             });               $filename = uuid::generate();             $extenstion = $file[0]->getclientoriginalextension();             $fileitself = $filename . '.' . $extenstion;              $path = "/uploads/" . $fileitself;              $img->save(public_path($path));         } 

dropzone.js options

dropzone.options.newpostform = {     paramname: "file-upload",     uploadmultiple: true,     dictdefaultmessage: "",     previewscontainer: ".dropzone-previews",     clickable: "#file-upload",     maxthumbnailfilesize: 20,     maxfilesize: 30 } 

not sure if help, here how did it:

    $upload_success = input::file('file')->move($destinationpath, $filename);       if( $upload_success ) {         return response::json('success', 200);     } else {         return response::json('error', 400);     } 

Popular posts from this blog