Object: | SoftArtisans.SAFile | ||||||||||||
Syntax: | ShortFilename | ||||||||||||
Type: | String | ||||||||||||
Read/Write: | Read Only | ||||||||||||
Description: |
This property returns the user's original name for the uploaded file, not including any path information. For example, if a user uploads a file from the following path on their hard drive: "C:\MyFiles\filename.txt", the ShortFilename property will return "filename.txt". This property can be used in conjunction with the SaveAs or SaveInVirtualmethods to save a file with the user's original user's filename in a directory otherthan the one used to temporarily cache the uploaded files (stored in the Path property ). The Save method, on the other hand, will automatically save a file with the user's original filename to the directory assigned to the path property. Using SaveAs or SaveInVirtual in conjunction with ShortFilename is especially useful when you wish to dynamically set the destination of the upload based on data passed from the upload form. If you intend to upload only one file, see also the ShortFilename property of the main FileUp object. |
||||||||||||
Examples: | |||||||||||||
Output first filename to user:
Save first file using original filename to directory chosen by the user:
|