• 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
Newbie : Upload file to database Method
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Newbie : Upload file to database Method


  • Subject: Newbie : Upload file to database Method
  • From: Gilles MATHURIN <email@hidden>
  • Date: Wed, 27 Sep 2006 21:20:10 -0400

Hello list

i look at the Developper example application who demonstrates the creation and use of WOFileUpload elements. It says that this element allows you to transport files from client machines to your application server. My question is :
Does that mean either "transport" to the database for storing ? Or only transport to the application for logic treatment ?


I don't know if i am clear, so let me reformulate : Are these examples adapted in the case you want to upload file to your database ?

I write a WOwebapp to administrate a database, when i test it on my dev machine and on my local network, it works great, but will it work on the final deployment configuration, when the hosted server will be far away ?

Here is an example of code used in it to upload images or mp3.file to the database :

===============
public WOComponent recordNewTitre()
{
EOEditingContext ec = album.editingContext();
extraitForm.setExtraitMp3(aFileMp3);
extraitForm.setFileName(aFileNameMp3);
extraitForm.setMimeType(aMimeSoundType);
album.addObjectToBothSidesOfRelationshipWithKey(titreForm,"titres");
titreForm.addObjectToBothSidesOfRelationshipWithKey (extraitForm,"extraitTitre");
ec.saveChanges();
setTitreList(album.titres().mutableClone());
setBoolTableauList(true);
return null;
}


    public NSData aFileMp3()
    {
        return aFileMp3;
    }
    public void setAFileMp3(NSData newAFileMp3)
    {
        aFileMp3 = newAFileMp3;
    }

    public String aFileNameMp3()
    {
        return aFileNameMp3;
    }
    public void setAFileNameMp3(String newAFileNameMp3)
    {
        aFileNameMp3 = newAFileNameMp3;
    }

    public String aMimeSoundType()
    {
        return aMimeSoundType;
    }
    public void setAMimeSoundType(String newAMimeSoundType)
    {
        aMimeSoundType = newAMimeSoundType;
    }
====================
_______________________________________________
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: Newbie : Upload file to database Method
      • From: Tom Marchand <email@hidden>
    • Re: Newbie : Upload file to database Method
      • From: John Larson <email@hidden>
  • Prev by Date: Duplicate entry [ was addObjectsToBothSide... not really both side]
  • Next by Date: Re: Newbie : Upload file to database Method
  • Previous by thread: Re: Knowing if a session exists
  • Next by thread: Re: Newbie : Upload file to database Method
  • Index(es):
    • Date
    • Thread