Hi Fred,
for large downloads I use this:
@Override
public void appendToResponse(WOResponse aResponse, WOContext aContext)
{
...
aResponse.disableClientCaching();
aResponse.removeHeadersForKey("Cache-Control");
aResponse.removeHeadersForKey("pragma");
aResponse.setHeader("inline; filename=" +
NSPathUtilities.lastPathComponent(_filename), "content-disposition");
aResponse.setHeader(useContentType, "content-type");
aResponse.setHeader(NSPathUtilities.lastPathComponent(_filename),
"content-name");
_asStream(aResponse);
}
private void _asStream(WOResponse aResponse)
{
try
{
File f = new File(getFilename());
int bufferSize = (f.length() < 1024 * 1024) ? (int)
f.length() : 1024 * 1024;
* aResponse.setContentStream(new FileInputStream(f),
bufferSize, f.length());
* }
catch (FileNotFoundException e)
{
...
}
}
Stefan
Am 03.03.10 23:54, schrieb Fred Wells:
No, I am not maybe I'm missing something but isn't my problem in the
response not the request?
thanks.
-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/stefan.klein%40buero-sde.de
This email sent to [email protected]
_______________________________________________
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]