F
Filament2y ago
adam

Permission denied when uploading images, PDFs work.

I am using SpatieMediaLibraryFileUpload to upload PDF's and images I added acceptedFileTypes(['application/pdf', 'image/jpeg', 'image/jpg', 'image/png', 'image/gif']) this lets me upload a PDF without issue, and it lets me select images but the images won't upload. Using image() also doerns't work but blocks PDFs But the image uploads are erroring at livewires endpoint but displaying an Nginx 500 error, the logs are showing that it's a permission issue. These images are like 40 K so it's not a size issue ` 2023/05/03 12:37:14 [crit] 67214#0: *1345 open() "/opt/homebrew/var/run/nginx/client_body_temp/0000000006" failed (13: Permission denied), client: 127.0.0.1, server: redacted.test, request: "POST /livewire/upload-file?expires=1683139334&signature=a2be0ff3714cb57218225122756bc5daf19f8f9c41c3d3a0bc3ca65d247b50e9 HTTP/1.1", host: "redacted.test", referrer: "http://redacted.test/admin/inspections/1/submit"`
5 Replies
Dan Harrin
Dan Harrin2y ago
where did you get your server config from? is it something trusted like laravel forge or vapor?
adam
adamOP2y ago
@danharrin it's actually local, the staging site is on forge. I will push my changes in a while and see what happens.
Dan Harrin
Dan Harrin2y ago
i havent experienced this are you using valet?
adam
adamOP2y ago
@danharrin no it's a Brew setup. I also haven't had this problem. I find it odd that it's an Nginx error.
Dan Harrin
Dan Harrin2y ago
try with valet, you can still use brew
Want results from more Discord servers?
Add your server