Correction of bugs when upload file.

Signed-off-by: jlucidar <jlucidar@gmail.com>