F
Filament6mo ago
青木

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.
No description
No description
11 Replies
Dennis Koch
Dennis Koch6mo ago
Please check the DevTools for errors Where are those images located? Also, FileUpload requires array structure even for one image I think.
青木
青木OP6mo ago
@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.
青木
青木OP6mo ago
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
No description
No description
青木
青木OP6mo ago
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
No description
Dennis Koch
Dennis Koch6mo ago
You need to set the temporary driver in the Livewire config to s3 too. Then it upload them directly to S3
青木
青木OP6mo ago
That's a problem, I'm using an S3-like provider which is not S3.
Dennis Koch
Dennis Koch6mo ago
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?
青木
青木OP6mo ago
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.
青木
青木OP6mo ago
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.
Dennis Koch
Dennis Koch6mo ago
OSS APIs that interact with objects are compatible with Amazon S3
Sounds like it should work and they just have more functions on top of S3?
青木
青木OP6mo ago
Yes, but they are signed and parameterized completely differently from S3
Want results from more Discord servers?
Add your server