Jan 8, 2016
0
Level 1
any body fimiliar with the blueimp/jQuery File Upload
hello every one i used the plugin to upload the file like this and it works and it also shows the preview this is the form fields
{{Form::open(['url' => 'image_update' , 'files' => true , 'method'=> 'post', 'id' => 'fileupload'] )}}
{{Form::file('_Add_img[]', ['class' => 'p7_fil_uplod', 'id' => 'mfile' ]) }}
and it goes to the route of image_update like this
Route::post('image_update',[
'as' => 'image_update' ,
'uses' => 'PagesController@postUpload']);
which has the following function
public function postUpload() {
$file = Input::file('_Add_img');
$filename = $file[0]->getClientOriginalName();
$dir = "public/resources";
list($path, $filename) = imageUpload($file[0] ,'200', '200', $dir, $filename);
//// to remove the public from path
$path=str_replace( 'public/', '' , $path);
return Response::json(['files' => [[
'name' => $filename,
'thumbnailUrl' => URL::to( "resources/".$filename),
'deleteUrl' => URL::to( "/resources/".$filename),
'deleteType' => "DELETE"
]]]);
}
but now i dont know how to delete the uploaded file through it any ideas would be of great help.
Please or to participate in this conversation.