Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Umbraco Forms deletes entire media folder when storing incorrect data when data type is File Upload #933

Closed
teeto opened this issue Dec 7, 2022 · 1 comment

Comments

@teeto
Copy link

teeto commented Dec 7, 2022

Saving Umbraco Forms records programatically, when the form has a property of type File Upload, if an incorrect value is stored, when deleting a record causes deleting the entire media folder.
This bug was discovered when fixing this issue:
#930

If no upload is selected what is coming is an empty object of FileList in javascript from the client.
As no upload is found, it is storing the string "[object FileList]" in the FileUpload field, i have fixed it storing null instead.

The bug is that if storing "[object FileList]" in the fileupload field, if you view the record in Umbraco Forms entries, the field is blank and if you delete the record, i dont know why the entire "media" folder is deleted.
So i guess the bug is that if an incorrect value is stored in the FileUpload field, deleting the record, may cause delete the entire media folder.

@AndyButland
Copy link

Thanks for reporting. We'll have a fix to prevent this occurring with the next set of patch releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants