You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems when uploading a file, the file is immediately created and any incoming data is written into it. However, this means the file is incomplete/invalid during the upload and there's no way to know as a user (or, in my case a tool processing the uploaded files) whether a file is complete or not. I didn't check what happens when an upload is aborted/fails, is the incomplete file then even left over?
Anyway, IMHO the upload would be much safer if the file is saved atomically. Just as a simple idea, the upload could be performed into a temporary file (e.g. ending with ~) and renamed when the upload succeeded. This way it is visible for humans and detectable by tools which files are incomplete.
The text was updated successfully, but these errors were encountered:
Hi, I have been trying add and to test upload files with progress bar. I use external vanilla JS and CSS file to use XHR to upload files. If it's complete, I will submit PR after merge to main code without external file.
Here is it look like now:
It seems when uploading a file, the file is immediately created and any incoming data is written into it. However, this means the file is incomplete/invalid during the upload and there's no way to know as a user (or, in my case a tool processing the uploaded files) whether a file is complete or not. I didn't check what happens when an upload is aborted/fails, is the incomplete file then even left over?
Anyway, IMHO the upload would be much safer if the file is saved atomically. Just as a simple idea, the upload could be performed into a temporary file (e.g. ending with
~
) and renamed when the upload succeeded. This way it is visible for humans and detectable by tools which files are incomplete.The text was updated successfully, but these errors were encountered: