rvkvino
1 year ago
37
3
Lumen

I have an issue on retrieve the image from the storage folder

Posted 1 year ago by rvkvino

I have written the code as like below to store the image into my server folder. I have an application written the API by using lumen and using front end as Mobile app developed by using ionic3. I could take the picture and store into server by the below code, $image = $request->file('photo'); $name = $image->getClientOriginalName(); $destinationPath = storage_path('/app/images/kyc'); if($image->move($destinationPath, $name)){ //Success the file upload means storing the file name into DB table } Now I need to reterive this profile picture to mobile app and need to display image. I have tried like http://mydomain.com/storage/app/profile/filename.png but it didn't work and showing like {"error":true,"message":"Unauthorized Request"}

Please sign in or create an account to participate in this conversation.