Instead of, or in addition to, a delegate, you can possibly subclass ERS3AttachmentProcessor, and subclass the ERS3UploadQueue, then override the constructor of ERS3AttachmentProcessor to use your ERS3UploadQueue subclass.
Then override ERS3UploadQueue.process(ERS3QueueEntry) method to do what you want.
...... or some variation of that ....., maybe just create your own S3 processor class by copying and modifying the current one.
Either way, Mike made it pretty flexible since you can install your own custom processors for specific types at startup:
ERAttachmentProcessor.addAttachmentProcessorForType(myS3Processor, ERS3Attachment.STORAGE_TYPE);
HTH,
Kieran
On Jan 14, 2011, at 10:15 AM, Jesse Tayler wrote:
> thanks guys -
>
> I was able to check which key changed off User but this looks better.
>
> Plus, I too wondered about S3 timing and that I'd have to get the image, process and upload again which works 'by hand' now.
>
> For some reason, I'm having trouble launching the UNIX script, maybe something in here will help me figure what's up there or otherwise write the file to disk more efficiently -
>
>
>
> On Jan 14, 2011, at 8:46 AM, Ramsey Lee Gurley wrote:
>> I've wondered why that delegate is never passed the actual file attached. Does this mean one needs to upload to S3, then turn right around and download it again in order to do post upload processing with the file itself?
>>
>> In my case I ended up creating a delegate interface of my own. Then I set the file on it in my custom upload component so I could get a handle to the file. You can see the call currently at line 113.
>>
>> https://r2d2w.svn.sourceforge.net/svnroot/r2d2w/trunk/ERR2d2w/Sources/er/r2d2w/components/R2D2WEditFile.java
>>
>> It would be interesting to know if there's some other built-in way to do this. Obviously I haven't discovered one yet (^_^)
>>
>> Ramsey
>>
>>>
>>>
>>> On Jan 13, 2011, at 10:58 PM, Jesse Tayler wrote:
>>>
>>>> should I be using my own subclass of ERAttachment in order to hear didInsert after the attachment gets saved?
>>>>
>>>>
>>>> On Jan 13, 2011, at 10:48 PM, Kieran Kelleher wrote:
>>>>
>>>>> Overide ERXGenericRecord.didInsert and didUpdate in your EOs.
>>>>>
>>>>> Regards, Kieran.
>>>>> (Sent from my iPhone)
>>>>>
>>>>>
>>>>> On Jan 13, 2011, at 10:36 PM, Jesse Tayler <jtayler@...> wrote:
>>>>>
>>>>>>
>>>>>> I'd like to trigger some events post-save, and I'd typically do this by listening to EOEditingContext didSave notification and look through the objects for any I'm interested in.
>>>>>>
>>>>>> I wonder if there's a WOnder methodology I should check out?
>>>>>>
>>>>>> I need to trigger a thumbnail generating unix script after an attachments saves to S3, this requires the final primaryKey.
>>>>>>
>>>>>> Any advice for what simplest/most WOnder'ish ?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> ------------------------------------------------------------------------------
>>>>>> Protect Your Site and Customers from Malware Attacks
>>>>>> Learn about various malware tactics and how to avoid them. Understand
>>>>>> malware threats, the impact they can have on your business, and how you
>>>>>> can protect your company and customers by using code signing.
>>>>>> http://p.sf.net/sfu/oracle-sfdevnl
>>>>>> _______________________________________________
>>>>>> Wonder-disc mailing list
>>>>>> Wonder-disc@...
>>>>>> https://lists.sourceforge.net/lists/listinfo/wonder-disc
>>>>>
>>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> Protect Your Site and Customers from Malware Attacks
>>> Learn about various malware tactics and how to avoid them. Understand
>>> malware threats, the impact they can have on your business, and how you
>>> can protect your company and customers by using code signing.
>>> http://p.sf.net/sfu/oracle-sfdevnl
>>> _______________________________________________
>>> Wonder-disc mailing list
>>> Wonder-disc@...
>>> https://lists.sourceforge.net/lists/listinfo/wonder-disc
>>
>>
>
>
> ------------------------------------------------------------------------------
> Protect Your Site and Customers from Malware Attacks
> Learn about various malware tactics and how to avoid them. Understand
> malware threats, the impact they can have on your business, and how you
> can protect your company and customers by using code signing.
> http://p.sf.net/sfu/oracle-sfdevnl
> _______________________________________________
> Wonder-disc mailing list
> Wonder-disc@...
> https://lists.sourceforge.net/lists/listinfo/wonder-disc
|