fixed some issues with file upload

Signed-off-by: naazgull <pedro.figueiredo@gmail.com>