RE: FW: WOFileUpload
RE: FW: WOFileUpload
- Subject: RE: FW: WOFileUpload
- From: "Kranthi Sagar Borra" <email@hidden>
- Date: Wed, 25 Feb 2004 11:16:33 +0530
- Thread-topic: FW: WOFileUpload
Hi Jonathan,
But how can I read the file uploaded size. Once I click on submit ,a request is send to the server and the response from the server comes back to me only after the response is generated ,so in between how can I get the file size and return back to the browser. I cannot even implement the WOLong ResponsePage for this since my class is already extending another class. Is there any other way of dealing with such a situation. Thank you.
Regards,
Kranthi Sagar.
> ----------
> From: Jonathan Rochkind
> Sent: Tuesday, February 24, 2004 10:11 PM
> To: Kranthi Sagar Borra; email@hidden
> Subject: Re: FW: WOFileUpload
>
> There is no built in way to do this.
>
> In fact, in the version of HTTP that WO uses, there's really no way
> to stop an HTTP request in progress. So if the browser submits a four
> gig file in an HTTP request, there's really no way to tell the
> browser to _stop_ doing this.
>
> However, that doesn't mean you need to do anything with what the
> browser is giving you.
>
> If you use the WO 5.2 streaming APIs (on WOFileUpload, for instance),
> you could read the file uploaded little by little, keeping track of
> how large it is. If it exceeds a certain size, you could then abandon
> it, and return a response telling them 'file too big' for example. WO
> does not require you to manually read the entire file from the
> streaming APIs. However, the browser will still _send_ the entire
> file to your server, before it gets the response with the page saying
> 'file too big'. Your WO app will just be ignoring it.
>
> --Jonathan
>
> At 6:21 PM +0530 2/24/04, Kranthi Sagar Borra wrote:
> >Hi,
> >is it possible to limit the file size using WOFileUpload component.
> >
> >Regards,
> >Kranthi Sagar.
> >
> >> ----------
> >> From: Kranthi Sagar Borra
> >> Sent: Tuesday, February 24, 2004 10:44 AM
> >> To: email@hidden
> >> Subject: WOFileUpload
> >>
> >> Hi ,
> >> I am using a WOFileUpload sub component in my main component. This
> >>main component has some mandatory text fields. Now if the user
> >>enters all the info in the text fields and selects a file to upload
> >>and then clicks on the submit button which will save the info
> >>entered and upload the selected file. But if he does not enter any
> >>one madatory field but still selects a file to upload, then an
> >>error message is shown in the same page asking him to enter the
> >>madatory field but the file that I just added now shows "no file
> >>selected" and I have to go and re-add the file. Is this correct
> >>behavior? Is there any way to make it so that the page retains the
> >>file that was chosen before the error message came up?Thank you for
> >>any advises.
> >>
> >> Regards,
> >> Kranthi Sagar.
> >> _______________________________________________
> >> webobjects-dev mailing list | email@hidden
> >> Help/Unsubscribe/Archives:
> >>http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> >> Do not post admin requests to the list. They will be ignored.
> >_______________________________________________
> >webobjects-dev mailing list | email@hidden
> >Help/Unsubscribe/Archives:
> >http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> >Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.