Spatie Media Library temporary upload location?

On my prod server I'm trying to determine where the SpatieMediaLibraryFileUpload uploader temporary location is. When trying to upload I receive an errorr 'failed to upload' , not sure if this is a directory permission issue or config issue?
No description
4 Replies
awcodes
awcodes7mo ago
The temp location is the same as the livewire default unless you change it. https://livewire.laravel.com/docs/uploads#temporary-upload-directory
Laravel
File Uploads | Laravel
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
BasherDesigns
BasherDesignsOP7mo ago
I'm using Cloudflare R2, so I changed the 'disk' to my r2 disk, and I can see the temporary file now on Cloudflare bucket, when I hit save, it says Saved but the media table is not updated with the new image. I can successfully edit/create new records but media table isn't being updated with new record. I should add, in dev on Herd, all works succesfully, saves and is uploaded to R2 as well.. hmm...
awcodes
awcodes7mo ago
Sounds like a disk config issue. Doesn’t the r2 disk have permissions and need a signed url to access files.
BasherDesigns
BasherDesignsOP7mo ago
Thats what I was thinking until I see Filament saving the image to the temp directory.. and the first time testing it created the livewire-tmp directory in the r2 bucket. I'm missing something here.. OK, here's my Form element:
SpatieMediaLibraryFileUpload::make('location-images')
->imageEditor()
->disk('r2images')
->label('Location Photos')
->columnSpanFull()
->collection('location-images')
->multiple()
->image()
->reorderable(),
SpatieMediaLibraryFileUpload::make('location-images')
->imageEditor()
->disk('r2images')
->label('Location Photos')
->columnSpanFull()
->collection('location-images')
->multiple()
->image()
->reorderable(),
and error I'm seeing:
production.ERROR: Illuminate\Translation\PotentiallyTranslatedString::__toString(): Return value must be of type string, null returned {"userId":2,"exception":"[object] (TypeError(code: 0): Illuminate\\Translation\\PotentiallyTranslatedString::__toString(): Return value must be of type string, null returned at /home/forge/domain.com/vendor/laravel/framework/src/Illuminate/Translation/PotentiallyTranslatedString.php:89)
[stacktrace]
production.ERROR: Illuminate\Translation\PotentiallyTranslatedString::__toString(): Return value must be of type string, null returned {"userId":2,"exception":"[object] (TypeError(code: 0): Illuminate\\Translation\\PotentiallyTranslatedString::__toString(): Return value must be of type string, null returned at /home/forge/domain.com/vendor/laravel/framework/src/Illuminate/Translation/PotentiallyTranslatedString.php:89)
[stacktrace]
Want results from more Discord servers?
Add your server