Woof currently copies defectively uploaded files
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Woof |
New
|
Medium
|
Tobias Baldauf |
Bug Description
When a file is sent to the host serving the web-upload form invoked by woof -U, it is <1MB stored in RAM & >1MB stored in /tmp until it is finished being transmitted. Then, it is copied from its temporary intermediate storage to its final destination.
If a file is corrupted during transfer - e.g. by the uploaders broken internet-connection or due to defective inodes on the HDD - it is probably still written to its final destination afterwards.
Tests need to be made if that is the case. If true, we should think about changing the order of:
shutil.copyfileobj (upfile.file, os.fdopen (destfile, "w"))
if upfile.done == -1:
self.
If we switch the order, we might prevent unfinished files from being written to their final destination. For this to happen, we need to find out more about "upfile.done". Where is it returned? What are its possible values?
Related branches
Changed in woofgui: | |
importance: | Undecided → Medium |
assignee: | nobody → Tobias Baldauf (technopagan) |
milestone: | none → wolowizard |