Update the code for uploading files to an IResource