Finished upload functionality (minus database)