Added the upload function