Changing the disk when you upload attachment in RichEditor
Is it possible to somehow tell filament where to store an attachment when you upload something in the RichEditor?
10 Replies
Please do try to read the docs π
RichEditor::make('content')
->fileAttachmentsDisk('s3')
->fileAttachmentsDirectory('attachments')
->fileAttachmentsVisibility('private')
https://filamentphp.com/docs/2.x/forms/fields#rich-editor
Ah sorry. I missed it π
Ok so I decided to use FileUpload for attachment.
But I the attachment doesnt load in the edit page. What could be the issue? This is the secure disk that I made:
Visibility private?
even if you have it "public", it still doesnt work
I can see the file being stored
Can you access the file
Via URL
Fairly sure public/private only works for s3
No I cannot
There is your problem, itβs not a filament issue
Maybe its an issue in the way ive structured the disk?
When you run storage:link Laravel only links to the public directory. If you want to have disks outside of that youβll have to register them manually with the filesystems config. https://laravel.com/docs/10.x/filesystem#the-public-disk
Laravel - The PHP Framework For Web Artisans
Laravel is a PHP web application framework with expressive, elegant syntax. Weβve already laid the foundation β freeing you to create without sweating the small things.