revert photo upload process instead of delete from folder manually

StackOverflow https://stackoverflow.com/questions/22161731

  •  19-10-2022
  •  | 
  •  

Вопрос

I use html5 file api so the flow is more direct and better UX in my opinion. When the user select their image, there will be a preview and the upload is running in backend in the same time. What I want to add is a cancel button.

Just curious is there any shortcut to undo or revert the last action (upload)?? or I need to manually write the delete logic?

Нет правильного решения

Другие советы

You would simply just delete the uploaded file using unlink() and remove from database if necessary.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top