The file is "transported" to your application. You are responsible for storing it in a database.

On Sep 27, 2006, at 9:20 PM, Gilles MATHURIN wrote:

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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/m0rchand% 40comcast.net

This email sent to [EMAIL PROTECTED]

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to