Thanks for pointing out.

Cheers

On Thu, Mar 4, 2010 at 7:49 PM, Anjo Krank <[email protected]> wrote:

> The whole idea of the aResponse.setContentStream(new FileInputStream(f),
> bufferSize, f.length()); is that you won't have to load the file into
> memory.
>
> Cheers, Anjo
>
> Am 04.03.2010 um 11:03 schrieb Cheong Hee (Gmail):
>
> > Hi Stefan
> >
> > I dare to suggest that it is not due to respnse/request.  I think it has
> to do with the Windows/Java that the file size it could handle in memory
> when using FileInputStream.  IIRC I had encountered similar file size
> limitation when doing file encryption with size more than 30M some time ago.
> > Just 2c.
> >
> > Cheers
> >
> > Cheong Hee
> >
> > ----- Original Message -----
> > From: Stefan Klein
> > To: [email protected]
> > Sent: Thursday, March 04, 2010 4:01 PM
> > Subject: Re: No Instance Availabe error on download
> >
> > 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/chng34%40gmail.com
> >
> > 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/anjo%40krank.net
> >
> > 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]

Reply via email to