F
Filamentβ€’9mo ago
jelmerkeij

FileUpload: Uploading (large files) directly to S3

Again I'm struggling with uploading of large files (several gigabytes). I am experimenting with using the S3 (in my case, DigitalOcean) as the filesystem. This in the hopes of having the FileUpload component set up to upload directly to the server when selecting a file instead of sending it to a temp directory on the webserver first and avoiding "File too large" errors. But I cannot figure out how to do this. Is this even possible? Can anybody please point me in the right direction of example?
3 Replies
jelmerkeij
jelmerkeijOPβ€’9mo ago
I got this working by publishing the livewire config: php artisan vendor:publish --tag=livewire:config Than in the published config/livewire.php under the array key temporary_file_upload=>disk I set it to the s3 disk. Now the temp files are directly uploaded to S3. Is this good practice or are there better alternatives to adjust the "temporary_file_upload disk" specifically for a single FileUpload component? Any suggestions on if this is good practice or are there better alternatives to adjust the "temporary_file_upload disk" specifically for a single FileUpload component? Or might this not be the right place to ask this question?
Liam
Liamβ€’9mo ago
Have you found a solution @jelmerkeij ? @Dan Harrin Sorry for the tag but we have this issue too. Is there any way to do this?
jelmerkeij
jelmerkeijOPβ€’9mo ago
I did not but I'm hoping to find out soon πŸ™‚ No luck with this. The only thing I can find is to do what I already did: publish the livewire config and set the disk for temporary_file_upload, but this sets it for all uploads. I doubt that it's even possible to have this set per FileUploadComponent.
Want results from more Discord servers?
Add your server