Help, Setting runtime config only for one FileUpload

Hi firends,

Here I have a FileUpload that is setupped to work with S3 pre-signed links and I need to change the livewire's temp dir disk to be one.
So my idea is to have FileUpload component extended and set the config runtime value there:

Class S3FileUpload Extends FileUpload
{
  protected function setUp(): void
  {
      parent::setUp();
      config(['livewire.temporary_file_upload.disk' => 's3']);
  }
  
}


but how to get it back to the default after components finished rendering/executing so no conflict or overide will happen if I have 1 S3FileUpload field and next to it i have a regular FileUpload?
Any idea how to handle this?
Was this page helpful?