Implemented switching to upload mode as soon as there is a file pending an upload.