SaveRecursive Method

 Object: SoftArtisans.FileUp
 Syntax: SaveRecursive
 Description: This method saves a group of files uploaded to the web server's hard disk using the user's original filenames and folder structure. For instance, if a user uploads the c:\INETPUB directory, all the files in that directory, as well as any files in any subdirectories, are saved to the hard drive with the same folder structure.
This method works in conjunction with SA-XFile's client and SA-JFile's client, both of which transmit an additional header called X-RelativeFileName. Standards browsers such as Internet Explorer or Netscape Navigator cannot recursively upload directories at the current time.

Let's say a user has a file called c:\temp\user\simple.doc, and chooses addDirectoryRecursive c:\temp. The uploaded data will include a header for this file:

X-RelativeFileName: user\simple.doc

Using SaveRecursive, the file is saved on the server side as {upload.path}\user\simple.doc.

To use the SaveRecursive method, you must set the Path property.

Example:

<%
	upl.Path = "C:\UploadDir"
	upl.SaveRecursive
	If Err <> 0 Then
         Response.Write("An error occurred when saving the file on the server.")
... %>

 

Previous Page Next Page