📄 faq.html
字号:
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
<META HTTP-EQUIV="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="KEYWORDS" content="PWS, BLOB, Personal Web Server, IIS, Internet Information Server, ASP, UPLOADING, UPLOAD, DEC, ALPHA, AlphaServer, AspUpload, Persits Software, Persits, Web, ASP, Active Server Pages, Active Server Component, Upload, browser, TYPE=FILE, TYPE, FILE, Windows, NT, Web, ACL, ACE, Access Control List, Directory, Listing, Export, Attribute, FILE, FREE, RFC1867, RFC-1867, 1867, Component, ENCTYPE, multipart/form-data, multipart, SA-FileUp, ActiveFile, Database, Multiple, download, downloading, unique, form, limit, size">
<meta name="DESCRIPTION" content="AspUpload.com - Freqently Asked Questions">
<TITLE>AspUpload.com - ASP Upload Frequently Asked Questions</TITLE>
</HEAD>
<BODY BACKGROUND="bk.gif">
<BASEFONT FACE="Helvetica, Arial" SIZE=1>
<!-- Main Data table -->
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 WIDTH=680>
<TD VALIGN=TOP WIDTH=140>
<FONT FACE="arial narrow" Size=2>
<B>
<IMG SRC="spacer.gif" BORDER="0" HEIGHT="15"><BR>
<IMG SRC="square.gif"> <A HREF="index.html">Home</A>
<BR>
<IMG SRC="square.gif"> <A HREF="whatsnew.html">What's New</A>
<P>
<IMG SRC="square.gif"> <A HREF="about.html">About AspUpload</A>
<BR>
<IMG SRC="square.gif"> <A HREF="codesample.html">Code Samples</A>
<BR>
<IMG SRC="square.gif"> <A HREF="livedemo.html">Live Demo</A>
<BR>
<IMG SRC="square_pressed.gif"> FAQ
<P>
<IMG SRC="square.gif"> <A HREF="xupload.html">XUpload</A><BR>
<IMG SRC="square.gif"> <A HREF="jupload.html">JUpload</A> <FONT COLOR="#FF0000"><i>NEW</i></FONT><BR>
<IMG SRC="square.gif"> <A HREF="aspjpeg.html">AspJpeg</A> <FONT COLOR="#FF0000"><i>NEW</i></FONT><BR>
<P>
<IMG SRC="square.gif"> <A HREF="download.html">Download</A>
<BR>
<IMG SRC="square.gif"> <A HREF="purchase.html">Purchase</A>
<P>
<IMG SRC="square.gif"> <A HREF="clients.html">Clients</A>
<BR>
<IMG SRC="square.gif"> <A HREF="testimonials.html">Testimonials</A>
<BR>
<IMG SRC="square.gif"> <A HREF="otherproducts.html">Other Products</A>
<P>
<IMG SRC="square.gif"> <A HREF="contact.html">Contact Us</A>
<FORM TARGET="_new" ACTION="http://support.persits.com/emails/signup.asp">
<FONT FACE="Arial Narrow" SIZE="2" COLOR="#9C3131"><B>Newsletter Signup</B></FONT><BR>
<INPUT TYPE="TEXT" NAME="email" SIZE="15" VALUE="e-mail address"></FORM>
<A HREF="http://www.persits.com"><IMG SRC="copyright.gif" BORDER=0></A>
</B>
</FONT>
</TD>
<TD VALIGN=TOP WIDTH=540>
<!-- Right Colum with data -->
<img SRC="faq.gif"><BR>
<TABLE WIDTH=540 HEIGHT=2 CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TD BGcolor="#FFCE00"><spacer type=block width=540 height=2></TD>
</TABLE>
<P>
<FONT Face=arial size=2><B>For more technical support information, visit our
searchable database of articles at
<A HREF="http://support.persits.com">SUPPORT.PERSITS.COM</A></B>.</FONT>
<P>
<TABLE WIDTH=540 HEIGHT=2 CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TD BGcolor="#FFCE00"><spacer type=block width=540 height=2></TD>
</TABLE>
<p>
<FONT Face=arial size=2>
<p><b><font color="#000000">Q1. I want to let my users specify the destination
directory to which the files will be uploaded. I included <font face="Courier New,Courier"><INPUT
TYPE="TEXT" NAME="PATH"></font> in the form, and my upload script looks
like this: </font></b><font face="Courier New,Courier"><font color="#CC0000"><%
n = Upload.Save(Upload.Form("Path")) %></font></font><b><font color="#000000">.
However this does not seem to work.</font></b>
<p><font color="#000000">A. You <B>cannot</B> use the <i>Form</i> collection
before calling <i>Save</i> 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:</font>
<p><b><font face="Courier New,Courier"><font color="#009900"><%</font></font></b>
<br><b><font face="Courier New,Courier"><font color="#009900">n = Upload.Save
"c:\upload"</font></font></b>
<br><b><font face="Courier New,Courier"><font color="#009900">For Each
File in Upload.Files</font></font></b>
<br><b><font face="Courier New,Courier"><font color="#009900">File.Copy
Upload.Form("Path") & "\" & File.ExtractFileName</font></font></b>
<br><b><font face="Courier New,Courier"><font color="#009900">Next</font></font></b>
<br><b><font face="Courier New,Courier"><font color="#009900">%></font></font></b>
<br>
<hr WIDTH="100%">
<b><font color="#000000">Q2: Will AspUpload work with any version
of ASP?</font></b>
<p><font color="#000000">A: No. Early versions of the ASP's <i>Request</i>
object did not provide the <font face="Courier New,Courier">BinaryRead</font>
or <font face="Courier New,Courier">TotalBytes</font> 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 <font face="Courier New,Courier"><%
n = Request.TotalBytes %></font> and see if the method is recognized by
your ASP module.</font>
<br>
<hr WIDTH="100%">
<b><font color="#000000">Q3: Where can I get the latest version
of ASP?</font></b>
<p><font color="#000000">A: You must install the Microsoft Option Pack 4.
<br>
<hr WIDTH="100%">
<b>Q4: Whenever I try to upload a file I am getting the error <font color="#FF0000">Persits.Upload.1
error '800a0003', Nothing has been posted</font>. Why?</b>
<p>A: One possible reason is that your version of ASP is old. See <b>Q2</b>
and <b>Q3</b>. Another possible reason is that you forgot to include the
<font face="Courier New,Courier">METHOD=POST</font>
attribute in your form.
<br>
<hr WIDTH="100%">
<b>Q5: I am getting the error <font color="#FF0000">Persits.Upload.1
error '800a0001', Request.BinaryRead Failed.</font> What does it mean?</b>
<p>A. In most cases it means that your upload script
calls the Request object prior to calling Upload.Save. You must never use Request.Form in your upload script, use Upload.Form instead.
This error may also mean that your version of ASP is old and does not
support the Request.BinaryRead method. See <b>Q2</b> and <b>Q3</b>.
<br>
<hr WIDTH="100%">
<b><font color="#000000">Q6: Why am I getting the following error:<P>
<FONT COLOR="#FF0000">
Microsoft VBScript runtime error '800a01ad' <BR>
ActiveX component can't create object <BR>
</FONT>
</font></b>
<p><font color="#000000">
A. It is a permission problem. Make sure Everyone has Full Control over AspUpload.dll.
</font>
<br>
<hr WIDTH="100%">
<b>Q7: When uploading large files, my script times out. What can I
do to prevent it?</b>
<p>A. Set the <font face="Courier New,Courier">Server.ScriptTimeout</font> property
to some large number such as 200 (in minutes) before invoking your upload script.
<hr WIDTH="100%">
<b>Q8: I am using the control <font face="Courier New,Courier"><SELECT
NAME="Choice" MULTIPLE></font> 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?</b><b></b>
<p>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:
<p><b><font face="Courier New,Courier"><font color="#009900"><%</font></font></b>
<br><b><font face="Courier New,Courier"><font color="#009900">For Each
Item in Upload.Form</font></font></b>
<br><b><font face="Courier New,Courier"><font color="#009900">
If Item.Name = "Choice" Then Response.Write Item.Value & "<BR>"</font></font></b>
<br><b><font face="Courier New,Courier"><font color="#009900">Next</font></font></b>
<br><b><font face="Courier New,Courier"><font color="#009900">%></font></font></b>
<br>
<hr WIDTH="100%">
<b>Q9. When I attempt to upload a file I always get the following error.
Why?</b><b></b>
<p><b><font color="#FF0000">Persits.Upload.1 error '800a0005'</font></b>
<br><b><font color="#FF0000">Access is denied.</font></b><b></b>
<p>A. This is an NTFS permission problem. The current user (such as IUSR_xxx)
must have Full Control over the upload directory to be able to create files
in it. You can instantly fix this problem by giving <I>Everyone</I> Full Control
over the upload directory, then tighten security as appropriate.
<hr WIDTH="100%">
<b>Q10. I want to use the LogonUser method to impersonate an admin
account in order to be able to save files on a remote machine. However,
I always get the error</b>
<p><b><font color="#FF0000">Persits.Upload.1 error '800a001e'</font></b>
<br><b><font color="#FF0000">A required privilege is not held by the client.</font></b>
<p>A. <B>Windows NT/IIS4</B>: Most probably, your virtual directory has the "Run in separate memory
space" option checked. This causes Windows NT to disallow calling LogonUser
unless the user has the privilege "Act as Part of Operating System". You
have two options: disable "Run in separate memory space" for this virtual
directory, or grant this privilege to all the users of your application
such as IUSR_xxx (go to User Manager, select Policies/User Rights, check
"Show Advanced User Rights", select "Act as Part of Operating System",
add desired users). We recommend that you reboot after that.<P>
<B>Windows 2000/IIS5</B>: Run Internet Services Manager.
Right-click your virtual directory and select "Properties".
On the "Virtual Directory" tab, set the "Application Protection" option to <I>Low</I>. If the option is disabled, click on the "Create" button first.
<br>
<hr WIDTH="100%">
<b>Q11. I am trying to specify a default value for an <INPUT TYPE=FILE>
item on my form, but the browser seems to ignore the VALUE attribute of
this tag. Client-side JavaScript does not help either. Is there a way I
can programmatically specify a file for uploading?</b>
<p>A. No, and there is a good reason for that. If setting a default value
for <INPUT TYPE=FILE> were allowed, one could easily write an HTML page
that would steal files from a user's machine without his/her knowledge
or permission. Although pure HTML won't help you, there is still a way
to specify a file for uploading programmatically: use a client-side upload
agent such as the XUpload ActiveX control available from <a href="http://www.aspupload.com">www.aspupload.com</a>.
<hr WIDTH="100%">
<B>
Q12. Why is the line <FONT SIZE=2 FACE="courier new">Set Upload = Server.CreateObject("Persits.Upload")</FONT> generating the error
<P>
<font color="#FF0000">
Server object error 'ASP 0177 : 8002801d'<BR>
Server.CreateObject Failed<BR>
Library not registered.
</FONT>
<P>
</B>
A. This error usually occurs because of tight security settings in the HKEY_CLASSES_ROOT
section of the registry. To fix the error, run <B>regedt32</B>
and select the key <B>HKEY_CLASSES_ROOT\TypeLib\{B4E1B2DE-151B-11D2-926A-006008123235}</B>.
From the Security menu, select Permissions. Add <B>Everyone</B> to the permission
list and assign <B>Full Control</B> to the Everyone account. Make sure the setting
propagates to the sub-keys as well.
<hr>
<b>Q13. I am using the file download feature of AspUpload (the SendBinary
method). However, whenever I try to download a text or MS Word file, it opens in
the browser rather than prompting me to save it on disk. How can I force a
"Save As" dialog?</b>
<p>A. Use the following download script (requires <B>AspUpload 2.1</B>):</p>
</font>
<p><font color="#009900"><%<br>
Set Upload = Server.CreateObject("Persits.Upload.1")<BR>
Upload.SendBinary Request("File"), True, "application/octet-stream", True<BR>
%></font></p>
<TABLE WIDTH=540 HEIGHT=2 CELLSPACING=0 CELLPADDING=0 BORDER=0>
<TD BGcolor="#FFCE00"><spacer type=block width=540 height=2></TD>
</TABLE>
<P>
<CENTER>
<A HREF="index.html"><IMG SRC="logo_small.gif" BORDER=0></A>
<BR>
<FONT Face=arial size=1>
Copyright © 1999 <A HREF="http://www.persits.com">Persits Software, Inc.</A><BR>
All Rights Reserved<BR>
Questions? Comments? <A HREF="MAILTO:info@aspupload.com">Write us!</A>
</CENTER>
</TD>
</TABLE>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -