Closed RyderForReal closed 3 years ago
Assuming you’re using the default (local disk) for media — do you see any files in the public/media
directory (from the app root)? I wonder if there is some permissions configuration that is not addressed there for the manual install.
I do. The uploaded image is in a subfolder of that folder as well. I'll try to chmod 777 the whole directory to exclude permission issues.
Nope. chmodded the directory (recursively, obviously) to 777 and still nothing. I'm not even getting an error now.. Although when uploading the image, it gives me a 404 for the preview: GET https://[domain]/media/7/conversions/[etc] 404
Tried uploading a profile picture to see if it's a general issue - that 404ed as well. GET https://[domain]/media/8/conversions/ryderfornow-icon.jpg 404
Curious — and you said the originals are being uploaded? But the conversions are missing?
Yes, it seems like it.
I can access the unconverted upload without any issues. But the conversion does not exist (neither on the filesystem nor on the site)
Hm ok. I wonder if there is a dependency missing from the manual install instructions for the media handling. What base system (Debian, Ubuntu, etc.) and version are you using?
Ubuntu (server) 20.04
Ok I’ll try to find some time today to test from that base and see if something is missing.
In the mean time you may be able to troubleshoot by poking around the docs for the library that handles these conversions — https://spatie.be/docs/laravel-medialibrary/v9/requirements
I’m guessing a PHP module or image library is missed somewhere in the install steps.
@RyderForReal a couple of things are probably happening here --
By default, the media conversions are queued. This seems unnecessary for an app like this so I have changed the example .env
file to handle conversions immediately instead of in queue. Add the following to your .env
to do the same:
QUEUE_CONVERSIONS_BY_DEFAULT=false
The temp
directory used by the media conversion library may not have correct permissions. To check them try:
ls -lah {APP_ROOT}storage/media-library/
There should be a temp
directory in there with permissions drwxrwxr-x
and uid:gid $USER:www-data. If the directory has some other permissions, see below and use those commands.
I also added a step to the manual install process to try to address this directly, but it may need more testing. As a final step the documentation now has:
1. Allow web server to access required directories.
sudo chown -R $USER:www-data {storage,public}
sudo chmod g+s {storage,public}
Let me know if any of that gets you going!
Works! Thanks a lot.
Nice! Eventually I need to come up with a way to simplify the permissions stuff for that manual install process…
After uploading a recipe image, it does not show up and instead 404s (when accessing my installation via its local IP) or straight up doesn't display without any errors (when accessing my installation via the url defined in .env).