Hussein
Hussein
FFilament
Created by Hussein on 3/20/2025 in #❓┊help
Order of the files in File Upload is not honored
The File Upload field in the Filament Form Builder does not preserve the order of files. Instead of maintaining the order in which the images are arranged in the gallery, the final order appears to be based on the upload completion time. Since files are uploaded in batches of two, the images that finish uploading first appear first in the final order once the form is saved. This issue occurs when the user clicks the Save button. Visually, the user sees the images in a specific order before saving, but after saving, the order changes, causing confusion. This is how i have the Form Field. Did I miss some attribute like preserveFileOrder or something like that? I can't seem to find what I'm doing wrong.
public static function form(Form $form): Form
{
return $form
->schema([
FileUpload::make('gallery')
->label('Gallery')
->image()
->multiple()
->appendFiles()
->panelLayout('grid')
->columnSpanFull()
]);
}
public static function form(Form $form): Form
{
return $form
->schema([
FileUpload::make('gallery')
->label('Gallery')
->image()
->multiple()
->appendFiles()
->panelLayout('grid')
->columnSpanFull()
]);
}
8 replies