Error 422 Uploading files with laravel livewire - laravel

I am trying to upload images to S3 using laravel livewire file upload, everything works fine in development, but after deployment on staging or production, I still can upload some images but others ( mostly taken with Iphone ) are giving 422 error, I can upload them after cropping them. How can I solve this issue? I am using Heroku.enter image description here
enter image description here

Okay, I solved this by adding FILESYSTEM_DRIVER=s3 into config vars in productions.

Related

cloudinary images works well with img tag in laravel 8 locally but not on heroku/production -- img displays blank on heroku

I tried displaying uploaded images from cloudinary but it wasn't showing using the below
<img style="width:auto" src="https://res.cloudinary.com/hrwev09ub/image/upload/v1637132013/dnpic_1637127942.png">
before now i tried the img tag above actually worked locally but not through heroku, because on heroku what i could see on checking the code source is the below
<img style="width:auto" src="dnpic_1637127942.png">
i am using Laravel 8 with cloudinary on heroku host -- can someone assist me with way out or refer me to a solution tips please.
I'm Danny and I work on Cloudinary's Developer Support team.
I've not had a lot of experience with deploying to Heroku, so I'm unable to speak on why the src is stripping out the https://res.cloudinary.com/hrwev09ub/image/upload/v1637132013 part, however I do notice that the full image path results in a 404.
Could you please let me know what happens when you try to reference the sample image (https://res.cloudinary.com/hrwev09ub/image/upload/sample.jpg) without specifying style=width:auto?
It may also help to confirm you've followed all the steps on Heroku's documentation about using Cloudinary, available here: https://devcenter.heroku.com/articles/cloudinary
Thanks,
-Danny

Laravel storage image on server is not showing

Hello laravel storage link image is showing perfectly in localhost and when i upload the project to shared hosting images are broken. To show images i have been using this syntax
<img src="/storage/users_image/{{$user->users_image }}"
the above one works great on localhost on shared hosting this images are broken to solve i make storage link but images are broken again on broken images it shows https://www.yuvxyz.com/storage/users_image/xxxy.png
note i have uploaded public and other folders on different folders.
Finally i got the solution from YouTube and it works i have created symlink then it worked here is the PHP file

image is save in server but cannot be accessed laravel

I am using laravel file-manager to store image and it was working fine in http but after changing to https the image are not being displayed although they are being stored in public folder. Only image that are added recently have that problem old image are fine.
The error was in storage:link so after unlinking and then linking that it worked.

Laravel 5.6 file not found in storage

My Laravel application is about uploading and showing images. It was working good and all images where shown correctly. Now a few weeks later I tried to test it again and it stopped working. Images are in Laravel storage and path is correct but it says: "Failed to load resource: the server responded with a status of 404 (Not Found)".
Path is: http://localhost:8000/storage/images/8/uploaded/1536930406sunflower.png, and it's correct, image is there.
Weird is that it was working for months and now images cannot be found.
Thanks!
I have found the solution to my question and for those who have the same problem:
Storage link in public folder can be possibly broken.
1)Delete storage link in app/public folder.
2)Run command php artisan storage:link to create storage link again.
Also, you have to be sure about your upload folder name and database image addresses are the same.
Otherwise, it will broke and do not forget that it is case sensitive.Example: If image address is "jpg/photo1.jpg" on DB. Your upload folder in storage folder must be "jpg" not "JPG".

Laravel 5.4 image won't upload

This is my first time working with Laravel 5.4 or any Laravel for that matter. I migrated a perfectly good working website to a new host. Now when I go to upload an image from admin or a user account the image won't upload. I get the whoops! error.
I have fixed all the broken links I can find, but I can't find where to go to fix the image won't upload issue.
Any help with this is greatly appreciated.
Thanks.

Resources