 |
aspSmartUpload
- Sample
1 : multiple upload
- Sample
2 : multiple upload using the «files» collection
- Sample
3 : upload with restrictions
- Sample
4 : multiple upload to a database
- Sample
5 : mixed upload : files + form fields
- Sample
6 : download from a file
- Sample
7 : download from a database
- Sample
8 : Unicode upload
|
Sample 1 : multiple upload |
Upload one or more files to the server.
The html form allows the user to select the file(s). The
ASP file uses aspSmartUpload to save the files to the server’s
disk.
In this sample, the files are saved directly with their
original name to a virtual directory on the web server.
aspSmartUpload also allows you to save files to any directory
on the server. |
| |
|
Sample 2 : multiple upload using the «files» collection |
Upload one or more files to the server and recover and display
details of files sent.
The html form allows the user to select the file(s). The
ASP file uses aspSmartUpload to save the files to the server’s
disk and to display the details of each file (name, extension,
size, type, etc.).
In this sample, we examine the «Files» collection. For each
file on the form which is actually sent, the corresponding
properties are displayed and the file is saved to a virtual
directory on the Web server. |
| |
|
Sample 3 : upload with restrictions |
Upload one or more files to the server with restrictions
on the file properties (extension, size, physical directory,
etc.). The html form allows the user to select the file(s).
The ASP file uses aspSmartUpload to set the restrictions
and save the files to the server’s disk.
Note :
Restrictions may also be set globally using the Registry.
They then take priority over restrictions set in the ASP
files (ISPs are particularly fond of this feature!). |
| |
|
Sample 4 : multiple upload to a database |
Upload one or more files to a database on the server. The
html form allows the user to select the file(s). The ASP
file uses aspSmartUpload to save the files in a database
(Access in this sample).
The files are saved in the «FILE» field of the «TFILES»
table and a new recording is generated for each file sent. |
| |
|
Sample 5 : mixed upload : files + form fields |
Upload form fields plus one or more files to the server.
The html file contains the various fields possible and allows
the user to select the desired file(s). The ASP file uses
aspSmartUpload to save the files to the server’s disk and
to recover the values of the completed form fields.
In the same way as the «Request.Form» function in ASP files,
aspSmartUpload’s «Form» object allows you to recover the
values held in the form. |
| |
|
Sample 6 : download from a file |
Download a file from the server.
The ASP file uses aspSmartUpload to download a file held
in a virtual or physical directory on the server.
aspSmartUpload also allows you to specify a default download
file name and a file type. |
| |
|
Sample 7 : download from a database |
Download a file held in a database.
The ASP file uses aspSmartUpload to download a file located
in a database field on the server.
aspSmartUpload also allows you to specify a default download
file name and a file type.
In this sample, an Access database is used and the files
are held in the «FILE» field of the «TFILES» table. |
| |
|
Sample 8 : Unicode upload |
Upload one File and one Text input to the server using utf-8.
- Set charset in the html form
- Set the same charset in the asp
- Set the codepage of aspSmartUpload according to the specified
charset |
This information has been provided by advantys and is ©
1995-2002 ADVANTYS. |
|
|
 |