Migrate the file upload preflight to the new API