Fred
Sorry for late respose.
This is how I did:
- Create a Template Class extends WOComponent.
- put in the stefan's code in AppendToResponse accordingly, including _asStream
method
- create a action button in the caller component such as:
public Template downloadAction() {
//for testing only, otherwise should use its class name to replace
"Template"
Template nextPage = (Template)pageWithName("Template");
// Initialize your component here
return nextPage;
}
- do test and the action button should trigger the download.
This is just a brief one and i believe more details could be found in
WebObjects file downloading sample code.
Cheers
Cheong Hee
----- Original Message -----
From: Fred Wells
To: Cheong Hee (Gmail)
Cc: [email protected]
Sent: Saturday, March 06, 2010 2:08 AM
Subject: Re: No Instance Availabe error on download
Cheong,
I'm not familiar with the code you're talking about, [stefan's code]. can you
sned a link?
thanks
-fw
"Cheong Hee \(Gmail\)" <[email protected]>
03/05/2010 01:41 AM
To <[email protected]>, "Fred Wells"
<[email protected]>
cc
Subject Re: No Instance Availabe error on download
Hi Fred
That is where I am trying to recall - is it due to when you zip all directory
of files and after that it was unable to continue when the file size reaches
~30M. The number 30M is quite a familiar number to me :) b'cos it hit me many
times before.
I have also tried out Stefan's code and it worked fine. I suggest you could
look at the code how you keep all the files zip together before calling
setContentStream.
Just4c now..
Cheers
Cheong Hee
----- Original Message -----
From: Fred Wells
To: [email protected]
Sent: Friday, March 05, 2010 4:58 AM
Subject: Re: No Instance Availabe error on download
Simon, Cheong, Anjo thanks.
So I was able to get it to work after pushing the send/recieve timeout up. So
in my attempts to get this to work I was using WOLongResponsePage and it still
failed. So was I using that wrong? I created a component that was a subclass of
WOLongResponse page and performed my actions in appendToResponse. That included
zipping up a directory of files and then passing the stream of that zip to the
content stream. Or did I need a combination of both [WOLongResponse and
adjusting the send/recieve timeout] to get this to work?
-fw
Simon <[email protected]>
03/03/2010 04:30 PM
To Fred Wells <[email protected]>
cc [email protected]
Subject Re: No Instance Availabe error on download
are you using the streaming request handler ?
On 3 March 2010 22:24, Fred Wells <[email protected]> wrote:
>
> Hello,
> I'm not sure if I missed something, I can't seem to find anything on this
> but I can't get files larger than a few MBs to download. I am currently
> using
> WOResponse.setContentStream and right now with a 29MB file it falls under a
> 'No Instance Available' error. Is this broken or is there an alternative?
> I'm using 5.3 on IIS.
>
> Thanks.
> -fred
>
> ------------------------------------------------------------------------
> Disclaimer
> The information in this email and any attachments may contain proprietary
> and confidential information that is intended for the addressee(s) only. If
> you are not the intended recipient, you are hereby notified that any
> disclosure, copying, distribution, retention or use of the contents of this
> information is prohibited. When addressed to our clients or vendors, any
> information contained in this e-mail or any attachments is subject to the
> terms and conditions in any governing contract. If you have received this
> e-mail in error, please immediately contact the sender and delete the
> e-mail.
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Webobjects-dev mailing list ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/webobjects-dev/simon%40potwells.co.uk
>
> This email sent to [email protected]
>
------------------------------------------------------------------------
Disclaimer
The information in this email and any attachments may contain proprietary and
confidential information that is intended for the addressee(s) only. If you are
not the intended recipient, you are hereby notified that any disclosure,
copying, distribution, retention or use of the contents of this information is
prohibited. When addressed to our clients or vendors, any information contained
in this e-mail or any attachments is subject to the terms and conditions in any
governing contract. If you have received this e-mail in error, please
immediately contact the sender and delete the e-mail.
------------------------------------------------------------------------------
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/chng34%40gmail.com
This email sent to [email protected]
------------------------------------------------------------------------
Disclaimer
The information in this email and any attachments may contain proprietary and
confidential information that is intended for the addressee(s) only. If you are
not the intended recipient, you are hereby notified that any disclosure,
copying, distribution, retention or use of the contents of this information is
prohibited. When addressed to our clients or vendors, any information contained
in this e-mail or any attachments is subject to the terms and conditions in any
governing contract. If you have received this e-mail in error, please
immediately contact the sender and delete the e-mail.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com
This email sent to [email protected]