#9 — uploading item should fire ObjectModifiedEvent for each object

State Resolved
Area Functionality
Issue type Bug
Severity Medium
Submitted by Daniel Widerin
Submitted on Apr 15, 2010
Responsible Ramon Bartl
Target release: 1.0rc1
I'm using Products.Quota and collective.uploadify to control amount of images beeing uploaded. Products.Quota listens on ObjectModifiedEvent to increase or decrease quota which is stored on each IQuotaAware implementing object.

I noticed, that in UploadCapableFileFactory no really "usable" event is fired, because _createObjectByType does not add the image or file (let's call it primary field) and object's size still is 0 bytes.

The object is *modified* after creation because title and primary field is set using their mutators. After reindexing the object we should also fire an IObjectModifiedEvent.
Added by Daniel Widerin on Apr 15, 2010 03:26 PM
Fixed in trunk
Added by Harald Friessnegger on Apr 15, 2010 03:29 PM
Issue state: UnconfirmedConfirmed
sounds sane for me, daniel.

another approach would be to somehow set the file/image before we fire the ObjectCreatedEvent. this would require major refactoring of UploadingCapableFileFactory, though.

so i'd go for the ObjectModifiedEvent solution.

what about you, ramon?

don't care whether we fire the event before or after running reindexObject()
Added by Ramon Bartl on Apr 15, 2010 04:04 PM
I'm fine with that solution.
Go for it daniel and thanks for quick answering frisi:)

@frisi, lets check this changes and when it's fine for you as well, we can close this issue and prepare a new release;)

thanks again daniel,
greets ramonski
Added by Ramon Bartl on Apr 25, 2010 08:18 AM
Issue state: ConfirmedResolved
Responsible manager: (UNASSIGNED)ramonski
Target release: None1.0rc1
included changes in 1.0rc1

No responses can be added.