F
Filamentβ€’12mo ago
Sjoerd24

Richeditor problem, images do upload when marked private but not public?

I have a strange problem, and I also found others with the issue (https://discord.com/channels/883083792112300104/1178647784757416016). So the problem is: If I use the following code:
Forms\Components\RichEditor::make('content')
->fileAttachmentsDisk('s3-public')
->fileAttachmentsDirectory('protocol_files')
->fileAttachmentsVisibility('private')
Forms\Components\RichEditor::make('content')
->fileAttachmentsDisk('s3-public')
->fileAttachmentsDirectory('protocol_files')
->fileAttachmentsVisibility('private')
Images are uploaded to my bucket and visible for like 5 minutes or something. (temp url expires, file stays in the bucket) Not very useful, but if I use the following:
Forms\Components\RichEditor::make('content')
->fileAttachmentsDisk('s3-public')
->fileAttachmentsDirectory('protocol_files')
->fileAttachmentsVisibility('public')
Forms\Components\RichEditor::make('content')
->fileAttachmentsDisk('s3-public')
->fileAttachmentsDirectory('protocol_files')
->fileAttachmentsVisibility('public')
The file is not uploaded or added the content field. I don't get any errors which make debugging a lot harder. If I use SpatieMediaLibrary I can upload files to the s3-public bucket so the connection should be working (as is also evident in the fact if I mark them private it also does work). Is this a filament bug? I already looked through the source code of filament but my skill is insufficient to comprehend. πŸ˜… I will try to make a bugreport if others have the same problem! Edit: just tried out TinyEditor plugin (https://github.com/mohamedsabil83/filament-forms-tinyeditor/blob/2.x/docs/usage-and-customization.md) and exactly the same behaviour! I think they use filament under the hood for uploading the images?
1 Reply
Sjoerd24
Sjoerd24OPβ€’12mo ago
Ok so I got a bit further, I now notice the file is being uploaded to the livewire temp folder (a S3 private bucket), but the transfer to S3-public fails for some reason.. Again with SpatieMediaLibrary it works, I have to admit it is a bit of a weird usecase but should work right? Hope somebody could help :). Edit: als tried changing livewire temp folder to local / s3-public , all again work but the file doesnt transfer to endpoint.
Want results from more Discord servers?
Add your server