Fix for remote file upload