| Object: | SoftArtisans.SAFile |
| Syntax: | UserFilename |
| Type: | String |
| Read/Write: | Read Only |
| Description: | This property contains the name of the uploaded file on the user's
hard disk, including path. Use VBScript to extract the filename extension if necessary.
See Example 2, below. The complete name of the file is dependent upon the user's operating
system. If the user uploads from a Windows PC, the path will be the
usual driveletter:\dir1\dir2\file.ext.
Several customers have reported that certain browsers on Macintoshes do
not report valid pathnames. We have been unable to verify this. See also the UserFilename property for the SAFileUp object. |
...
The file you uploaded was <%=upl.form("File1").UserFilename%>.
...
<%
Set upl = Server.CreateObject("SoftArtisans.FileUp")
'---
'--- Set the default path to store uploaded files.
'--- This should be set immediately after creating an instance.
'---
upl.form("File1").Path = "c:\myuploads"
'---
'--- Save the uploaded file with the same name as the user's file
'--- (assuming the user is Windows-based).
'---
NewFileName = Mid(upl.form("File1").UserFilename, InstrRev(upl.form("File1").UserFilename, "\") + 1)
upl.form("File1").SaveAs NewFileName
... %>
| Previous Page | Next Page |