Click to See Complete Forum and Search --> : Upload File In ASP Error


yeapjudy
June 15th, 2007, 04:05 AM
Dear All,

I ready ready need ur all help, i plan to upload the file using ASP and ActiveFile object, the code i was write as below (I search from Internet)

UploadFile.asp
===========

<form method="post" action="FileUpload1.asp" name="submit" enctype="multipart/form-data">
Choose A File: <input type="file" name="filefield"><br><br>
<input type="submit" name="submit" value="submit"><br>
</form>

FileUpload1.asp
============

<%
Set Post = Server.CreateObject("ActiveFile.Post")

Post.Upload "C:TEMP"


' Display a summary of the uploaded data

For Each FormInput In Post.FormInputs



If FormInput.ContentType <> "" Then

' Display uploaded file information

Response.Write FormInput.Name & " = " & FormInput.File.FileName & _

", size=" & FormInput.File.Size & "<BR>"

Else

' Display form element name and value

Response.Write FormInput.Name & " = " & FormInput.Value & "<BR>"

End If



Next

%>

When try to run, the error below display:

Server object, ASP 0177 (0x800401F3)
Invalid class string

I not know why? is it i not have this object in my workstation? How can i check the object?

Hope somebody can try to solve my problem. TQ

PeejAvery
June 15th, 2007, 10:00 AM
Did you get your example from here (http://www.asp101.com/resources/uploadinfo.asp)? Sounds to me like you need to register the upload DLL.

regsvr32 c:\path\to\aspupload.dll

WizBang
June 15th, 2007, 01:25 PM
Here is all you need to allow users to upload:
http://www.freeaspupload.net/

Of course, the folder where the files are stored needs to have the proper permissions set.