이미지 파일을 서버에 업로드하려고하면 무작위로 오류가 발생하고 가끔은 같은 파일에 문제없이 잘 작동합니다.laravel을 사용하여 파일을 업로드 할 때 알 수없는 오류가 발생했습니다.
Symfony \ Component \ HttpFoundation \ File \ Exception \ FileException
The file "xxxxxx.jpg" was not uploaded due to an unknown error.
이 내 코드입니다 :
if (Input::hasFile('thumbnail_image')){
// Upload Photo
$thumbnailImage = Input::file('thumbnail_image');
$filename = 'thumbnail.'.Input::file('thumbnail_image')->getClientOriginalExtension();
$destinationPath = 'training_product/article_id_'. $id .'/thumbnail_image';
$databasePath = '/adidas/public/training_product/article_id_'. $id.'/thumbnail_image';
$uploadFile = Input::file('thumbnail_image')->move($destinationPath, $filename);
$product->thumbnail_images_path = $databasePath.'/'.$filename;
$product->save();
}
laravel 로그 파일에 유용한 정보가 있습니까? –
laravel 로그가 알 수없는 오류를 반환합니다. $ uploadFile = Input :: file ('thumbnail_image') -> move ($ destinationPath, $ filename); 그리고 내가 파일을 업로드 한 것 같아요하지만 어떤 설정이 잘못 알고 때로는 때로는 작동하지 않고 때로는 작동하지 않는다 –
파일이 대상 위치에 이미 있으면 어떻게됩니까? – Gagan