arashb's avatar

file upload

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?

0 likes
3 replies
arashb's avatar
arashb
OP
Best Answer
Level 4

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.