Closed wanteed-lh closed 6 years ago
changer function uploadFileOrMultiUpload
in path App\Application\Controllers\Traits\UploadTrait.php
cs Intervention\Image
package not supported pdf ,txt
protected function uploadFileOrMultiUpload($image , $destinationPath){
$extension = $image->getClientOriginalExtension();
$fileName = rand(11111,99999).'_'.time().'.'.$extension;
if(in_array($extension, allowExtentionsFiles() ) ){
$image = $image->move(path($destinationPath), $fileName);
return $fileName;
}
$image = Image::make($image);
/*
* upload resize image
*/
$image->save(path($destinationPath.DS.$fileName));
$image->fit(path(env('SMALL_IAMGE_WIDTH')), path(env('SMALL_IAMGE_HEIGHT')));
$image->save(path(env('SMALL_IMAGE_PATH').DS.$fileName) , path(env('IMAGE_RESLUTION')));
return $fileName;
}
pull from dev this issues fixed in dev