Binary file upload nearly working