• 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
Problem to record an image file in a OpenBase Database with a WebObject application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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
  • Follow-Ups:
    • Re: Problem to record an image file in a OpenBase Database with a WebObject application
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: Problem with webobject attributes in WOBuilder
  • Next by Date: Re: php scripts inside WebObjects
  • Previous by thread: WebObjects Development training
  • Next by thread: Re: Problem to record an image file in a OpenBase Database with a WebObject application
  • Index(es):
    • Date
    • Thread