Handle case of size 0 file.
Merge pull request #1047 from jburel/upload-develop

Upload