Make upload file works in new architecture