Another strange WOFileUpload behaviour...
Another strange WOFileUpload behaviour...
- Subject: Another strange WOFileUpload behaviour...
- From: Alexandra Milton <email@hidden>
- Date: Sat, 17 Jul 2004 20:29:44 +0200
I ran into another strange WOFileUpload behaviour that maybe someone
can explain.
Uploading files (using the "data"-binding) work just fine and
everything ends up in my MySQL-database.
However when I want to edit the article which the image is a part of
everything get displayed expect that the WOFileUpload says "no file
selected". The strange part is that the content object is there with
filename, mimetype and everything displaying correctly. I even tried
putting a WOImage just below it and the NSData object is there as well
(and the images gets displayed in the browser) but somehow seem not to
be "set" in the refreshed WOFileUpload element.
The effect is that whenever I want to save changes to the content
object it gets set to "NULL" and overwrites the image in the database.
Is this another of these infamous WOFileUpload bugs or have I done
anything wrong?
The bindings for the WOFileUpload looks like this:
SwitchComponent1: WOSwitchComponent {
WOComponentName = elementTypeItem.elementTypeDesc;
cols = elementTypeItem.elementCols;
rows = elementTypeItem.elementRows;
value = contentObject.dataText;
size = elementTypeItem.elementCols;
filePath = contentObject.dataPath;
data = contentObject.dataContent;
mimeType = contentObject.dataMimeType;
}
Regards,
Alexandra
Stockholm, Sweden
PS. I have tried using WOElements wrapped in my custom Components and
bind that to the WOSwitchComponent as suggested on the list and that
part works just fine DS.
_______________________________________________
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.