Added upload function & logic for file uploads

working :)