Fixed file upload
Merge pull request #1010 from Zentyal/cperello/upload-fixes

Fixed file upload