FileUpload issue with multiple machines

I'm using the FileUpload component, to upload a files in S3.

Sample code:
Action::make('i-r')
    ->button()
    ->form([
        FileUpload::make('r')
        ->disk('s3')
        ->directory('tmp')
        ->visibility('private')
])
->action(function (array $data): void {
    if ($data['r'] === null) {
        Log::error("Uploading Failed!");
        return;
    }
    dispatch(... job that gets the file and process it);
}),


When I use only one app machine i.e. vm (scaling), the upload works correctly i.e.
  1. the file is uploaded correctly "storage\app\livewire-tmp" when I pick it
  2. the file is uploaded to "s3" "tmp" folder when I click the Submit button
When I use multiple app machines the file gets uploaded to "storage\app\livewire-tmp", under name like 'JBexfBvW1lJgkJyjxaWYasj09aUWZ3-metaU2FsZXNfUmVwb3J0X0RFQ18yMDIzX0hleUhhcHBpbmVzc19QTC5DU1Y=-.csv' (including the single quotes, which is strange), but when I click the Submit button, it's not uploaded to the S3 folder.

In the multiple app engines case it does not work even if it's executed on the app engine on which it was previously worked perfectly (in single single engine mode)

Do you have any idea, why when adding second app engine for my application, the uploads stops working? Is there something that I have to configure additionally? Any help will be appreciated.
Was this page helpful?