ShortFilename Property |
![]() |
| 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". See also the ShortFilename property of the main FileUp object. |
<%
'--- Create an instance of SoftArtisans FileUp
Set upl = Server.CreateObject("SoftArtisans.FileUp")
'--- Set the default path to store uploaded files
upl.Path = "c:\temp"
%>
The first file is <%=upl.form(file1).ShortFilename%>.
...
<%
'--- Create an instance of SoftArtisans FileUp
Set upl = Server.CreateObject("SoftArtisans.FileUp")
'---Set the default path to store uploaded files
upl.Path = "c:\temp"
'--- Retrieve the user's directory choice from the form
newPath1 = upl.Form("directory1")
'--- Save the individual file to the user's chosen directory
'--- with the user's original filename
upl.Form("file1").SaveAs newPath1 & "\" & upl.Form("file1").ShortFilename
%>