Here's what I'm trying to do. I'm adding an event receiver on my pictures library such that when something gets uploaded, the image gets resized.
I've got the code working fine for this. However, there is the additional requirement of resizing based on another column in the library. If the
Image Size column is set to
small, for example, the image is scaled smaller, etc.
Because this is a library instead of a list, adding an item actually triggers both
itemAdded (after the file is uploaded) and
itemUpdated (after the file's metadata has been added). I only want the resize functionality to occur when the item has been initially added though and not when the item gets edited any other time later on.
Is there a way to do this? To have the resize function run only when the file has been added initially and after the metadata for its size has been populated?