move file upload out of _form to avoid new error