added code to upload files to the server