got rid of deprecated middleware for file upload