Images uploaded without the FileUpload component cannot be displayed.
Examining the html structure I find that the cover field is empty, this data exists in my database.
11 Replies
Please check the DevTools for errors
Where are those images located?
Also, FileUpload requires
array
structure even for one image I think.@Dennis Koch I modified the file storage and it worked fine.
Other questions about file uploads regarding OSS storage like s3?
1. the average execution time when requesting a pre-signed URL for a single S3 is 1s .
2. 140 files exist in my data.
3. my Nginx is set to timeout at 1 minute.
The upload component of filament puts the call to get the files into one request (even though my files exist in a different component) which causes the request to be very slow until the gateway times out.
I'm using Alibaba Cloud Storage, a service provider similar to s3.
The upload will go through PHP again to upload to Alibaba cloud storage, but the preview will sign the URL correctly
https://github.com/livewire/livewire/blob/636725c1f87bc7844dd80277488268db27eec1aa/src/Features/SupportFileUploads/WithFileUploads.php#L15
https://github.com/livewire/livewire/blob/636725c1f87bc7844dd80277488268db27eec1aa/src/Features/SupportFileUploads/FileUploadConfiguration.php#L45
It seems that only drivers with s3 can be uploaded, but nothing like that can be uploaded correctly in the browser.
package: alphasnow/aliyun-oss-laravel
GitHub
livewire/src/Features/SupportFileUploads/WithFileUploads.php at 636...
A full-stack framework for Laravel that takes the pain out of building dynamic UIs. - livewire/livewire
GitHub
livewire/src/Features/SupportFileUploads/FileUploadConfiguration.ph...
A full-stack framework for Laravel that takes the pain out of building dynamic UIs. - livewire/livewire
You need to set the temporary driver in the Livewire config to s3 too. Then it upload them directly to S3
That's a problem, I'm using an S3-like provider which is not S3.
Doesn’t matter if the protocol is S3. It seems to work with your uploads right? So it will work with the temporary uploads too
Or what do you mean by „s3-like“? It’s not using S3 protocol?
https://www.alibabacloud.com/en/product/object-storage-service This is its official website.
AlibabaCloud
Object Storage Service (OSS)-alibabacloud
Alibaba Cloud Object Storage Service (OSS) provides industry-leading scalability.Fully managed object storage service to store and access any amount of data from anywhere.
Thinking about the temporary storage issue, I need files to be uploaded directly to cloud storage for my business, as my server's bandwidth is only 1Mbps, files are not suitable for forwarding storage via laravel.
OSS APIs that interact with objects are compatible with Amazon S3Sounds like it should work and they just have more functions on top of S3?
Yes, but they are signed and parameterized completely differently from S3