Hi all,
I have this requirement in my current project: when a file is added to a document library on one site collection, move the file to a different site on different site collection. To achieve this, I have written an Event Receiver on the document library. Added my code to "Copy" the file to the destination site in ItemAdded() event, then "Delete" the file from source library in ItemUpdated() event. This is working perfectly fine when a single file is updated. But when Multiple File Upload option is used, ItemUpdated() event doesn't fire and as a result I am unable to delete files uploaded after they are copied over to the destination site. Copying works file in this case as well, only deletion isn't happening.
I had to put the delete code in ItemUpdated() event as I can not delete the file before Meta data extraction screen appears. If I put the delete code in ItemAdded() event, I get error that file has been deleted or modified by another user.
Can anyone help me here?
Thank you in advance!