You could make disk that points to /tmp and use that. https://github.com/livewire/livewire/blob/master/config/livewire.php#L98
Or make a command to clean up that directory using task scheduling :)
i have a livewire form which also includes and upload section for attaching a cv. upon form submission an email is sent, consist of all input fields data including the uploaded file. i noticed that upon uploading livewire instantly creates a subfolder in the storage/app directory named "livewire-tmp" and keep the uploaded file there. also upon form submission another copy of the same file is created inside another folder in the storage/app directory named "photos". so, basically when the form is submitted i have a duplicated file stored inside the server which i don't want that storage consumption. is there a parameter to be set for livewire to remove the files after certain amount of time or to be deleted immediately after submission from those two directories?
apparently there is no such parameter to be defied unless one wants to modify "WithFileUploads" hence i did it manually: $files = Storage::files('livewire-tmp'); Storage::delete($files);
Please or to participate in this conversation.