ABCHK Support

Homee-Mail Support Web HostingOutlook Error CodeDIY / Eshopping
SearchFile ManagerForm DownloadFAQ AreaContact Us

Solution

  • Samples
  • Form
  • Request
  • Upload method
  • Upload and UploadInFile methods
  • DownloadFile and DownloadField method

ASPSmartUpload is installed on our Windows servers. Below are the instructions for it's use.

Samples

For sample code for ASPSmartUpload please visit the ASPSmart website at: http://www.aspsmart.com/aspSmartUpload/

Form

The ENCTYPE="multipart/form-data" attribute in the FORM tag is required.

Example :

<FORM ENCTYPE="multipart/form-data" ACTION="/scripts/aspSmartUpload/upload.asp">
<INPUT TYPE="FILE" NAME="MYFILE">
<INPUT TYPE="SUBMIT">
</FORM>

Request

For an Upload the ASP "Request" object can not be used to retrieve form fields. But it is possible to use the "Request" object to retrieve parameters used in an URL.

Example :

HTML Form

<HTML>
<BODY>
<FORM ENCTYPE="multipart/form-data" ACTION="/scripts/aspSmartUpload/upload.asp?MYPARAM=test">
<INPUT TYPE="TEXT" NAME="MYTEXT">
<INPUT TYPE="FILE" NAME="MYFILE">
<INPUT TYPE="SUBMIT">
</FORM>
</BODY>
<HTML>


ASP Script

<%

' Impossible
' ********
' Request("MYPARAM")
' Request("MYTEXT")
' Request("MYFILE")

' Possible
' ******
Request.QueryString("MYPARAM")
Set myUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
myUpload.Upload
myUpload.Form("MYTEXT")
myUpload.Files("MYFILE")

%>

Upload method

The Upload method must be called before any other methods of the aspSmartUpload object.

Example :

<%
Set myUpload = Server.CreateObject("aspSmartUpload.SmartUpload")

' Impossible
' ********
' myUpload.Form("MYTEXT")
' myUpload.Upload

' Possible
' ******
myUpload.Upload
myUpload.Form("MYTEXT")
%>

Upload and UploadInFile methods

The Upload and UploadInFile methods cannot be used in the same ASP script.

DownloadFile and DownloadField methods

The ASP script which execute a download should not have HTML tags.

Example :

DownloadFile
<%
Set myUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
myUpload.DownloadFile("/aspSmartUpload/Upload/sample.zip")
%>

DownloadField
<%
Set myRecordSet = Server.CreateObject("adodb.recordset")
myRecordSet.Open
Set myUpload = Server.CreateObject("aspSmartUpload.SmartUpload")
myUpload.DownloadField(myRecordSet("FILE"))
myRecordSet.Close
Set myRecordSet = nothing
%>

Back  - Contact Us - Content Search
SPAMMING or Mass Mailling not Allow

Powered by ABCHK.com