AspUpload 1.x

Frequently Asked Questions

Copyright (c) 1998 Persits Software, Inc.




Q1. I want to let my users specify the destination directory to which the files will be uploaded.  I included  <INPUT TYPE="TEXT" NAME="PATH"> in the form, and my upload script looks like this: <% n = Upload.Save(Upload.Form("Path")) %>. However this does not seem to work.

A. You can not use the Form collection before calling Save because it is not yet populated. The right way to do it is to upload the files to a temporary directory and then copy or move them to the specified destination directory as follows:

<%
n = Upload.Save "c:\upload"
For Each File in Upload.Files
File.Copy Upload.Form("Path") & "\" & File.ExtractFileName
Next
%>



Q2:  Will AspUpload work with any version of ASP?

A:  No. Early versions of the ASP's Request object did not provide the BinaryRead or TotalBytes methods which the component heavily relies on. The best way to test whether your version of ASP allows uploading is to execute a simple script like <% n = Request.TotalBytes %> and see if the method is recognized by your ASP module.



Q3:  Where can I get the latest version of ASP?

A: It depends on the type and version of your web server. If you are using PWS or IIS 3.0 you can download the latest version of ASP from http://www.microsoft.com/office/intranet/modules/asp411s3.asp.
If you are using IIS 4.0 you may need to install Option Pack 4 downloadable from http://www.microsoft.com/iis.



Q4: Whenever I try to upload a file I am getting the error Persits.Upload.1 error '800a0003', Nothing has been posted. Why?

A: One possible reason is that your version of ASP is old. See Q2 and Q3. Another possible reason is that you forgot to include the METHOD=POST attribute in your form.



Q5: I am getting the error Persits.Upload.1 error '800a0001', Request.BinaryRead Failed. What does it mean?

A. It most probably means that your version of ASP is old and does not support the Request.BinaryRead method. See Q2 and Q3.



Q6:  Does Microsoft Internet Explorer 3.0 support file uploading?

A:  By default, no. You need to install an IE3 upload add-on available from http://www.microsoft.com/msdownload/iebuild/ie3add_win32/en/ie3add_win32.htm.



Q7: When uploading large files, my script times out. What can I do to prevent this?

A. Set the Session.Timeout property to some large number such as 200 (in minutes) before calling Upload.Save.



Q8: I am using the control  <SELECT NAME="Choice" MULTIPLE> in my upload form. I noticed that Upload.Form("Choice"), unlike Request.Form("Choice"), only returns one of the selected string. Is it possible to access all selected strings in this control?

A. Yes. Unlike Request.Form, the Upload.Form collection will store each selected string as an individual item, but under the same name. You can access all selected strings as follows:

<%
For Each Item in Upload.Form
    If Item.Name = "Choice" Then Response.Write Item.Value & "<BR>"
Next
%>


For more information on AspUpload, visit Persits Software, Inc. at http://www.persits.com/aspupload.html or write to support@persits.com.