The Upload's temp file is being closed at the end of the '_run'.
We need to remove that closing from there, and only close the file at the very end of the command, when the file is also removed from disk (which is today being done in 'handle_failure' and 'handle_success', and could be done in 'finish' so it also includes the command being cancelled).
The Upload's temp file is being closed at the end of the '_run'.
We need to remove that closing from there, and only close the file at the very end of the command, when the file is also removed from disk (which is today being done in 'handle_failure' and 'handle_success', and could be done in 'finish' so it also includes the command being cancelled).