Object: | SoftArtisans.FileUp | ||||||||||||||||||
Syntax: | Path[=Physical Path As String] | ||||||||||||||||||
Type: | String | ||||||||||||||||||
Read/Write: | Read/Write | ||||||||||||||||||
Description: |
This property defines the default directory for saving files. It also defines the default directory for caching files before a final save is executed in ASP, provided the property is set before any form elements or files are referenced in the script.
After determining the directory that will be used by the Path propery, you must also be certain to grant "read", "write" and "modify" NTFS permissions so that FileUp can cache or save to this location. Setting the path property in ASP can improve performance in the following ways:
In ASP, when the first upload reaches the server, FileUp will search for a writable Temp directory, and assign it to the Path property. FileUp will check the following: the TEMP environment variable, C:\Windows\Temp, C:\Winnt\Temp, C:\Temp, C:\tmp, and GetTempDir(). If FileUp does not find a writable Temp directory, and the Path property is not set in script, an error will occur. A Path assignment in script will overwrite FileUp's default Path value. If you set Path, you can still save the file to a different location. When using the SaveAs method, specify a new complete path and file name. In this scenario, the upload is cached in the default path. When the SaveAs method is executed, the file is moved from the default path to the new destination. This works even if the new destination is on a different disk or on a network share.
|
||||||||||||||||||
Examples: | |||||||||||||||||||
Cache and save the upload on the web server at C:\Uploads:
Cache and save the upload to a network shared drive:
Cache the upload to the web server and save it to a network shared drive:
|