Closed vgavrilovikj closed 2 years ago
I am using your library to handle filepond image upload, however when I upload the image I receive the following error:
This is the function for uploading the image
public function imageUpload(Request $request, Filepond $filepond, $folderName) { $count = UtilController::countOccurrencesInString($filepond->getPathFromServerId($request->input('image_upload')), '/'); if ($count > 1) { $image = UtilController::replaceFirstString('/', '\\', $filepond->getPathFromServerId($request->input('image_upload')), $count-1); } else { $image = $filepond->getPathFromServerId($request->input('image_upload')); } $parts = explode("/", $image); $pathArr = explode('.', $image); $imageExt = ''; if (is_array($pathArr)) { $imageExt = end($pathArr); } $name = explode(".", $parts[1]); $fileName = $name[0] .'-'.rand().'.'.$imageExt; $finalLocation = $folderName . '/' .$fileName; try { Storage::disk('s3')->put($finalLocation, file_get_contents($image)); } catch(Exception $e) { return response()->json(array('message' => $e), 500); } return $fileName; }
Could you please help me with it? Thanks!
I'm guessing this is a specific issue with your setup. If this is still an issue, feel free to open a new issue with a minimal reproduction, then I can have a look.
I am using your library to handle filepond image upload, however when I upload the image I receive the following error:![image](https://user-images.githubusercontent.com/29601489/130834770-565712bb-4f6b-45c9-86ff-5909e4742759.png)
This is the function for uploading the image
Could you please help me with it? Thanks!