Resolving bug related to re-uploading a file.

@wender Check it! :D