thevalleyraceway.com schrieb am 18.03.2013, 01:54 Uhr:
Style= "font-size:14px;" > and Sac Voyage Paul Smith the traditional JSP, in flex, sometimes need to achieve a file upload and download function, but in the flex file upload and download realization is relatively complex, how to realize, please see the following.
the flex is a relatively new technology, at the time of the study, or by the JSP way, in the beginning, basically have the following kinds of train of thought:
A, using FTP way to upload and download files, need to use flex socket interface.
Pantoufles juicy couture
B, using webService way to upload and download files
C, using flex+sevlet+fileupload component to sweatshirts Ralph Lauren realize the file upload and download the
by comparison, the final choice of third, using Flex+sevlet way to complete file upload and download function, the reasons are as follows (and the ideas above corresponding):
A, relates to the flow of the operation, to achieve more complex error soft leather handbags occurred, a relatively high probability of
B, flex on end of reference information less, and the need to start the WebService service magasin converse on
C, this technology is more mature, starting from flex2.0, at the flex end can reference the FileReference classes, and in the Java end of mature component can be used, so finally considering the use of this method to deal with.
, file upload
1, Flex end
A, use of the class:
FileReference class provides the user computer and the server to upload and download files between method.Operating system dialog box prompts the user to select a file to upload or download location for.It is mainly to achieve a file upload.
FileReferenceList is provided to allow the user to select one or more file to upload methods.The FileReferenceList object the user disk on a group of local file (or multiple files) is represented as an array of FileReference objects.
B, use the FileReferenceList class to multiple file upload:
1) the class: VAR myFileRef = new FileReferenceList ();
2) call FileReferenceList.browse () method, this method will open a dialog box, allowing the user to select one or more to upload the file: myFileRef.browse ();
3) successful call browse () method, use an array of FileReference objects to populate the FileReferenceList objects fileList property.