0
검색 한 결과이 문제에 대한 답을 찾지 못했습니다.Intervention 업데이트시 이미지 소스를 읽을 수 없습니다.
음, laravel 5.5에서 개입하여 사진을 업로드하고 있습니다. 내 조리법 (내 경우)이 create
인 경우 모두 작동하고 사진이 성공적으로 업로드되고 있습니다.
$front_image = $request->file('front_image');
$frontImageName = md5(time()) . '.' . $front_image
->getClientOriginalExtension();
$locationfi = public_path('photos/front/' . $frontImageName);
Image::make($front_image)
->resize(454,340)
->insert(public_path('photos/logo.png'),'bottom-right')
->save($locationfi);
$recipe->front = $frontImageName;
모든 표준 재료 :
이
초기 업로드 코드입니다. 하지만edit
을 시도하면
Image source not readable
이됩니다.
$front_image = $request->file('front_image');
$frontImageName = md5(time()).'.'.$front_image
->getClientOriginalExtension();
$location = public_path('photos/front/'.$frontImageName);
Image::make($front_image)->resize(690,517)
->insert(public_path('photos/tk.png'),'bottom-right')
->save($location);
//update the database
$recipe->front=$imageName;
나는 두 가지 형태로 enctype="multipart/form-data"
를 사용에 대한 생성 및 업데이트 : 이 재 업로드에 대한 코드입니다. 업데이트 양식에서 나는 {{method_field('PUT'}}
도 사용합니다.
무엇이 여기에 있습니까? 감사.
어떤 버전의 PHP를 사용하고 계십니까? –
PHP 7을 사용하고 있습니다. @sunitiyadav – GabMic