Problem to record an image file in a OpenBase Database with a WebObject application
Problem to record an image file in a OpenBase Database with a WebObject application
- Subject: Problem to record an image file in a OpenBase Database with a WebObject application
- From: Gilles MATHURIN <email@hidden>
- Date: Sat, 17 Jun 2006 00:26:30 -0400
Hello everyone,
i don't manage to record an image file in my Openbase database with a
webobject application.
This webapp use a WOFileUpload and a Submit Button which is bind to
this action method :
public WOComponent addToDB()
{
EOEditingContext ec = session().defaultEditingContext();
NSData fileContents = new NSData(aFileContents);
artisteItem.setPhotoID(fileContents);
ec.saveChanges();
return null;
}
PhotoID is an attribute of my EOModel set to "binary" for External
type and "NSData" for Value Class.
i have this in my .wod file :
FileUpload2: WOFileUpload {
data = aFileContents;
filePath = aFileName;
mimeType = aMimeType;
And here are my instance variable declared in my Main.java file :
protected NSData aFileContents;
protected String aFileName;
protected String aMimeType;
protected Artiste artiste;
public Artiste artisteItem;
Anyone can help please ?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden