Cancelling a media upload with MediaSavingNotification still saves the file to disk #16868
Replies: 4 comments
-
Hi there @DanDiplo! Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better. We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.
We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
Beta Was this translation helpful? Give feedback.
-
Agree with @DanDiplo. This should work as he said. We need to set different file size limits for different file types, and this not working as above is very annoying. |
Beta Was this translation helpful? Give feedback.
-
Hi @DanDiplo , thank you for reporting this issue. |
Beta Was this translation helpful? Give feedback.
-
@NguyenThuyLan When you say "wait for the server to clean the files up" does that imply the file will eventually get removed by Umbraco or are you talking about some other manual clean up? Are you saying it's not currently possible to stop a file being uploaded or to delete a file when using the MediaSavingNotification handler? |
Beta Was this translation helpful? Give feedback.
-
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
13.2.2
Bug summary
When using the
MediaSavingNotification
to cancel a file upload, the file doesn't appear in the media library but is still uploaded to the server and added to the Media folder.Specifics
We've implemented a check to ensure Image uploads cannot be over a fixed size. If they are we cancel the operation using a notification. The check works and a notification is shown to the user saying the upload is too large - and the file doesn't show in the media library. However, it is still saved to disk in the Media folder. I believe that if you cancel the save operation then it should not save the media to disk and completely stop it being added.
Steps to reproduce
I've implanted the
INotificationHandler<MediaSavingNotification>
Expected result / actual result
I'd expect cancelling the operation to prevent the file being saved to disk.
Beta Was this translation helpful? Give feedback.
All reactions