Re: Newbie : Upload file to database Method
Re: Newbie : Upload file to database Method
- Subject: Re: Newbie : Upload file to database Method
- From: Tom Marchand <email@hidden>
- Date: Thu, 28 Sep 2006 13:10:23 -0400
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@hidden)
Help/Unsubscribe/Update your Subscription:
40comcast.net
This email sent to email@hidden
_______________________________________________
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