I think you need to give the full path of where to save the file and what to call it, not just 'public'
Feb 17, 2018
7
Level 2
Stuck in uploading image by intervention
Unable to insert image in either using store or save. Using store says store function not available to GD...using save says not correct string value
public function uploadfile(){
// $manager = new ImageManager(array('driver' => 'imagick'));
$request= Req::capture(); // This gives you the current
//get file
$file =$request->file('file');
$file=Image::make($file)->resize(128, 128);
// $file = $request->file('file')->store("public");
$file= $file->save("public");
return $file;
}
Level 122
So returned from uploadFile is an instance of Intervention image. You store this in the database, so what you are looking at in the database is the binary of the image.
If this is not what you wanted, return the filename from uploadFile instead. Probably also change the database column type.
Please or to participate in this conversation.