Fix for file upload

Fixes an error that occurs when the source tries to upload a file.