-
Notifications
You must be signed in to change notification settings - Fork 386
-
Notifications
You must be signed in to change notification settings - Fork 386
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
uploads folder is full of trash files #261
Comments
Hey, it is definitely possible but would require a patch that I have not had time to PR. I'm not at my computer at the moment, but if you're interested in looking there's an upload.go file (I believe) where you'd likely check the byte length of the multipart fields and ignore anything that is == 0. I would like to change the API a bit before v1 so that only multipart encoded form requests even go down the path of an upload and enable create/update requests to be in any other encoding. That would be an awesome PR if you are interested... |
I could only implement a workaround to not show the zero-byte files in the GUI. I could not figure out how to get the files to not be created. I think in order to do this several functions will have to be split up. As it stands now, it seems like the functions in question will only write to the database if the file is created. So- no file, no database entry. This means that content cannot be created without a timestamped file being created first, which needs to be split out of the functions and made to be a separate, optional, operation. Edit: Ideally though, these functions would be rewritten. |
Files and functions that are involved:
Perhaps, if |
Thought I would take a look at this, but I can not replicate this behaviour. Fixed already? Anyone else see empty files created? I see folders, but not files. |
Closing this on the basis that it is now old and I could not replicate - either with file or filerepeater. It may have been addressed. Please re-open if anyone finds this to still be an issue. |
Whenever I create a content item I get an empty file in the
uploads
folder.Why does this happen?
Is it possible to prevent this from happening so that only files > 0 bytes are put there?
Edit:
I have discovered that the filenames are timestamps. But why do they exists?
The text was updated successfully, but these errors were encountered: