FileUpload
After Uploading a image using Fileupload the preview of image not loading , iam getting an error..This is my code
FileUpload::make('details.image')->preserveFilenames()->enableOpen()
->getUploadedFileNameForStorageUsing(function (TemporaryUploadedFile $file): string {
$timestamp = Carbon::now()->timestamp;
return (string) str($file->getClientOriginalName())->prepend($timestamp.'_');
})
->image()->directory('incident-images')->enableDownload()->label('Image Upload'),
this is .env APP_URL=http://localhost
, this is my filesystem 'local' => [
'driver' => 'local',
'root' => storage_path('app'),
'throw' => false,
],
'public' => [
'driver' => 'local',
'root' => storage_path('app/public'),
'url' => env('APP_URL').'/storage',
'visibility' => 'public',
'throw' => false,
],
, please anyone help me to solve this error2 Replies