Object: | SoftArtisans.FileUp | ||||||||||||
Syntax: | SaveAs([in] Filename As String) | ||||||||||||
Description: |
This method saves an uploaded file to the Web server's hard disk. If an upload contains more than one file, only the first one is saved. To save multiple files in a single upload, use the method SAFile object's SaveAs() method: File.SaveAs.
If no path is specified (e.g., fileUpload.SaveAs "FileX.ext"), the value of the Path property is used. For more efficient processing, it is recommended that you always use set the Path property before saving any files. If the Filename parameter includes a file path, it must specify a physical path (for example "C:\UploadDir\FileX.ext"). You cannot pass a virtual path to the SaveAs method. By default, an uploaded file will overwrite a file on the server with the same name. To prevent this, set OverwriteFilesto False. |
||||||||||||
Examples: | |||||||||||||
The following sets the Path property to C:\Temp and saves the upload on the Web server at C:\Uploads:
The following sets the Path property to C:\Temp and saves the upload to a network shared drive:
|