Thanks Paul,

Glad to hear it is working for you - I may have to go back to it and try again 
- my problems are usually just me. :-) Like I said, I could never get past 
“Upload Starting…”

On the plus side, it did actually perform the upload and create/save the 
attachment EO.

My bindings were similar to yours but I wasn’t using a specific named 
configuration. But I used the same approach for finishedFunction.

thanks again,

Tim


> On Apr 5, 2016, at 4:55 PM, Paul Hoadley <[email protected]> wrote:
> 
> Hi Tim,
> 
> On 5 Apr 2016, at 10:10 am, T Worman <[email protected] 
> <mailto:[email protected]>> wrote:
> 
>> I’ve tried pretty much every uploader in the ERAttachment package with poor 
>> results. I guess the only option is to transition to "javascript guru.” I 
>> spent a LOT of time with ERAttachmentFlexibleUpload - and never could get it 
>> to display anything but “Upload Starting …” I tried every post-processing 
>> binding I could find.
> 
> Firstly, I can sympathise. It’s a minefield.
> 
>> Now simplifying to ERAttachmentUpload (with ajax). No matter what I try I 
>> cannot get the component to update anything after completion - which is 
>> similar to the problems with the flexible version. For simplicity, I reduced 
>> to one AUC (“fullPageContainer") that wraps all the page content.
> 
> I can’t vouch for that component, but I can tell you that we’ve got 
> ERAttachmentFlexibleUpload working in a couple of projects. It might be worth 
> giving it another look. Here’s an example of working usage:
> 
> <wo:ERAttachmentFlexibleUpload configurationName="JobDocument" 
> attachment="$nextJobDocument.attachment" 
> editingContext="$nextJobDocument.editingContext" autoSubmit="$true" 
> finishedAction="$finished" 
> finishedFunction="function(){documentContainerUpdate();}" />
> 
> We’re using S3 here, and ‘configurationName’ points to some properties for 
> this particular entity:
> 
> er.attachment.JobDocument.s3.accessKeyID=
> er.attachment.JobDocument.s3.secretAccessKey=
> er.attachment.JobDocument.s3.bucket=
> er.attachment.JobDocument.s3.host=
> er.attachment.JobDocument.s3.acl=
> 
> All of those have appropriate values set, obviously. nextJobDocument is an 
> ivar containing a JobDocument “cover entity”, which itself has a relationship 
> to ERAttachment. (That is, JobDocument.attachment() returns an ERAttachment.) 
> The finished() method just creates a new JobDocument and assigns it to 
> nextJobDocument—all of this occurs before the component tries to get the 
> ERAttachment via nextJobDocument.attachment(), so it all happens just in 
> time. finishedFunction just calls some Javascript to updating the containing 
> AUC.
> 
> And that’s it. There’s no other magic. Try it out.
> 
> 
> -- 
> Paul Hoadley
> http://logicsquad.net/ <http://logicsquad.net/>
> 
> 
> 

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to