Previous PageNext Page

11.2.2 Method Details

11.2.2.1 SaveToFile

Saves the stored file from the given filebase with the given identifier to a file with the given path.

      Arguments

      Path

      The full path to the file that the file is to be saved as.

      Example:
      A script that uploads the file:

<FORM ACTION="fileupld.asp" METHOD="POST" ENCTYPE="multipart/form-data">

<INPUT TYPE="FILE" NAME="FILE">

<INPUT TYPE="SUBMIT" VALUE="Send">

</FORM>

      A script that processes the upload:

<%

Response.Expires = 0

Set fbase = Server.CreateObject("Chili.Upload.1")

fbase.SizeLimit = 10000

fbase.SaveToFile("/opt/datafiles/test.dat")

%>

Done writing <%=fbase.FileSize%> bytes from user file <%=fbase.SourceFileName%> (of type <%=fbase.SourceFileExtension%>)


Copyright © 2000 Chili!Soft

Previous PageTop Of PageNext Page