| Object: | SoftArtisans.FileUp |
| Syntax: | SaveBinaryAs ([in] Filename) |
| Description: | This method saves the raw HTTP Post stream to the web server's
hard disk without any interpretation. If no path is specified (e.g., upl.SaveAs "FileX.ext"), the value of the Path property is used. For more efficient processing, it is recommended that you always use the Path property before saving any files. When a path is specified as part of filename given to the SaveAs ("C:\UploadDir\FileX.ext"), the Path argument must contain the complete path. Relative paths cannot be used. The SaveBinaryAs method cannot be used in conjunction with any other method that interprets HTTP Post stream, such as getting form values or saving a decoded upload to disk. You must use one or the other. |
<% '--- '--- Create an instance ofSA-FileUp. '--- Set upl = Server.CreateObject("SoftArtisans.FileUp") '--- '--- Set the default path to store uploaded files. This step is not '--- strictly necessary, but performance is better if you specify the path. '--- upl.Path = "C:\Temp" '--- '--- Set the filename. Use any valid filename. '--- filename = "Upload.tst" %> The server's path for uploaded files is: <%= upl.Path %><BR> Saving the file to : <%= filename %><BR> <% On Error Resume Next '--- '--- Save the file now. '--- upl.SaveBinaryAs filename if Err <> 0 Then %> An error occurred when saving the file on the server. <% ... %>
| Previous Page | Next Page |