I've got a page that requires the user upload a photo. I'm using
Stripersist and having some trouble forumlating how to move foward.
Per Freddy's book, I know I can set up the upload to either store the file
on the file system or, I'm guessing, the DB. However, in both cases, I'm
not sure how to structure my objects.
Right now, I'm thinking of adding a FileBean property to my Item object:
@Entity
public class Item extends ModelBase {
@OneToOne
private Person person;
...
private FileBean picture;
...
}
...but how will this be represented as a column in the DB (I'm using
Hypersonic)--as a blob?
Furthermore, if I create a stand-alone class called Attachment, and make
this a property in there there (and then reference Attachment from within
Item), the same question.
What have others done to solve this problem.
Oh yeah, and if I want to restrict the type of file the user can upload
(.jpg/.jpeg or .gif), does Stripes provide me the ability to control the
MIME-type via validation?
TIA.
------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users