Woof currently copies defectively uploaded files

Bug #673961 reported by Tobias Baldauf
6
This bug affects 1 person
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.send_error (408, "upload interrupted")

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
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.