• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: WOFileUpload Error After Change To 5.2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WOFileUpload Error After Change To 5.2


  • Subject: Re: WOFileUpload Error After Change To 5.2
  • From: "Jonathan Fleming" <email@hidden>
  • Date: Tue, 15 Apr 2003 00:45:13 +0100

From: Jonathan Rochkind <email@hidden>
To: "Jonathan Fleming" <email@hidden>, email@hidden
Subject: Re: WOFileUpload Error After Change To 5.2
Date: Mon, 14 Apr 2003 13:42:58 -0500


Someone else just posted on this same issue today.

But anyway, this is a bug. I'm not sure if it's been fixed in WO 5.2 update 1, haven't checked it yet.

No it has not, I'm running WO5.2.1 on Windows Platform (havn't installed it on Mac yet since most of my development is done in the Windows environment _ don't ask why it's a sever / developer juxtaposition thingy-ma-jig, I'm a Mac man myself.


By the way, this bug is also evident in WebObjects FileUpload example app that comes with WO5.2 that's how I found out something was wrong. After a submit on a test upload if you hit the submit button again the error presents itself only the images don't get nullified like my app does but the filePath certaily does. Its on the Component OutputStream Upload examples.


But the bug is: the filePath _should_ be null, but is instead set to the name of the WOFileUpload element. The workaround is: manually set the name element (create a 'name' binding on the WOFilePath, set it to some constant, say "___FileUpload"). If the filePath equals this constant you set it to, you know that it SHOULD have been null, but due to a WO bug it wasn't.

Ok, my binding to filePath is sPicRefFull, should I now change this to something like your suggestion for instance "___FileUpload1" for the 1st fileUpload element and "___FileUpload2" for the other. What then do I do with the original binding sPicRefFull?



Keep in mind that if you have multiple WOFileUploads in the same form, each one must have it's own unique name. You can't use the same constant for each one. Normally WO takes care of this for you, but our workaround requires us to set the name manually, so we have to deal with it. I haven't come accross a situation where I needed more than one upload in a form, but it would be kind of a pain in the ass to fix it.

That's interesting... so what do you do when say you want the user to upload an image that is a thumbnail (gif) and one that is an enlargment of the thumbnail (Jpeg)? Or do you simply get the user to upload one large image as a Jpeg and resize that in the WOImage binding... surly that would take time for the file to load because in effect it is still a chunky file size all be it compressed into a smaller dimesion... thus the next post I will get onto again is the matter of resizing an image on the fly.


I think this whole WOfileUpload and WOImage thing needs to be takled hand in glove 'cause the two of them live together practically and I have tried to read through soooo many post to get to solutions and there seems to be few of those that I'm understanding and the end of lengthy disscussions .
For example did you ever follow up the post: image scaling, Java
Randy Caldwell Randy_Caldwell at partech.com , he sent you a few links one of which was this: http://rsb.info.nih.gov/ij/ is it any good, worth bother or pursuing or are there better solutions? I'm looking for a relly good solid solution to the problem of scaling images on the fly if anyone has any answers or preferably code. It would make a heap of developers love the poster to pieces... well, maybe not that far.
Anyone got answers? Throw them up on a post titled "Upload And Resize On The Fly". That'll get both subjects covered in one post ideally. I'm soooo wishing for an answer to this! For me this is important to everything I do with web applications coming from the world of photography and all that, they surround this subject.
We're taking getting to grips with memory, being cautious of what is being uploaded, needing to flush the system after large uploads when they happen. Worst still, in one of the post i read whilst trying to reach a resolve on this subject is that , is that someone could effectivly upload a gigabyte file and completly freeze your system befor you can validate it's size... so you see this subject is important to have a tight grip on it.




Like I said, it's also possible this bug has been fixed in update 1 for 5.2. If it has, getting the update is certainly the easiest fix.

As before, I'm already on that one mainly cause of the problems I saw people having... I had this app for few months before I finally installed it taking heed of your reccommendation that it is the most stable WebObjects release yet : -). Hopefully you big guns have ironed out all those problems... at least they seem to be lessening in irrate posts to what they were at first.



Hope this helps,
anything always helps, even if you don't get it right away, it soon sinks in later down the road I've found

With so much in mind it's hard to think of even the simplist things. Sorry for putting it on you group.
Jonathan F ;-)




At 07:11 PM 4/14/2003 +0100, you wrote:


In WO5.1.3 everything worked fine. I have two WOFileUpload components in a WOForm one does gif thumbs, the other jpeg full images, both bound in the WO5.1 way... data and filePath. I used keyValueCoding to copy the image into an iVar and then took the content of this to upload to the file system if it contained something. On updating, if I updated the other contents of the form but didn't upload an image to the WOFileUpload component it would update those things but not enter anything in the filePath binding thus not overwriting the image files in the file system, however, now I in 5.2 I get this: 2.1.123.0.1.5.25 in the filePath binding regardless of making sure the iVar I store the image in is null.
How do I correct this?
I've read many problems that seem to be somthing like this but I'm not sure what I'm reading is excactly this sort of problem and furthermore I'm not getting to a solution with all that reading which is equally agonising.
So if this has been covered a zillion times already, I apologise for bringing it up again... one more time can't hurt can it :)


Thanks
Jonathan

What is the quick fix for this WOFileUpload error in 5.2

_________________________________________________________________
It's fast, it's easy and it's free. Get MSN Messenger today! http://www.msn.co.uk/messenger


_______________________________________________
WebObjects-dev mailing list
email@hidden
http://www.omnigroup.com/mailman/listinfo/webobjects-dev

_______________________________________________ WebObjects-dev mailing list email@hidden http://www.omnigroup.com/mailman/listinfo/webobjects-dev


_________________________________________________________________
_______________________________________________
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.

  • Follow-Ups:
    • Re: WOFileUpload Error After Change To 5.2
      • From: Jonathan Rochkind <email@hidden>
  • Prev by Date: Re: Update Web Service
  • Next by Date: Re: Loading WebObjects Deployment On Server - 1st Attempt
  • Previous by thread: WOFileUpload Error After Change To 5.2
  • Next by thread: Re: WOFileUpload Error After Change To 5.2
  • Index(es):
    • Date
    • Thread