updating so that multiple resources can be uploaded