SJ
SJ
FFilament
Created by SJ on 1/8/2024 in #❓┊help
Dynamic Navigation with SubMenus not displaying
No description
12 replies
FFilament
Created by SJ on 1/5/2024 in #❓┊help
Upload Files automatically in FileUpload after Drag & Drop
I would like to create a simple file upload form that automatically saves the files after drag & drop or after file selection in the location specified in the code without an additional submit button. Would this be possible with Filament Forms?
public function form(Form $form): Form
{
return $form
->statePath('data')
->schema([
FileUpload::make('file')
->label('Dateien hochladen')
->disk('s3')
->directory($this->path)
->imagePreviewHeight('150')
->preserveFilenames()
->multiple()
->moveFiles()
->removeUploadedFileButtonPosition('right')
->uploadButtonPosition('right')
->uploadProgressIndicatorPosition('left')
]);
}
public function form(Form $form): Form
{
return $form
->statePath('data')
->schema([
FileUpload::make('file')
->label('Dateien hochladen')
->disk('s3')
->directory($this->path)
->imagePreviewHeight('150')
->preserveFilenames()
->multiple()
->moveFiles()
->removeUploadedFileButtonPosition('right')
->uploadButtonPosition('right')
->uploadProgressIndicatorPosition('left')
]);
}
4 replies