Fixed a bug in fileref upload error handling
Merge pull request #23 from cizra/fileref-upload-bug

Fixed a bug in fileref upload error handling