be more strict with parameter types on file upload and changed some parameter orders