Prepare upload file