The main "workhorse" method which captures uploaded files,
saves them on disk or in memory, and populates
the Files and Form collections.
Path, if specified, is the destination directory where files are to be saved.
If Path is omitted, files are saved in memory. A file in memory can be
accessed via the property File.Binary or saved to hard drive via the
method File.SaveAs.
The Key and Ext parameters are to be used if you wish to
encrypt files being uploaded.
Key is a CryptoKey object creatable with the
AspEncrypt component.
If this parameter is specified, the files will be encrypted with this key
before being saved. Ext
is an optional extension which will be added to the original file name.
For more information on file encryption and decryption, visit the
AspEncrypt web site at www.aspencrypt.com/task_upload.html.
Return value: the number of successfully uploaded files.
Usage:
Count = Upload.Save ' save to memory
Count = Upload.Save("c:\upload") ' save to hard drive
Upload.Save "c:\upload" ' save to hard drive, ignore return value
Upload.Save , Key, "xxx" ' Save to memory, encrypt with Key
Upload.Save "c:\upload", Key, "xxx" ' Save to hard drive, encrypt with Key
Relevant Chapters: 2, 3, and all others.