468,505 Members | 1,927 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,505 developers. It's quick & easy.

Simple File Upload Script

I found this when searching. I need to have a simple script that will
upload a single file.
It is giving me an error on Set upl =
Server.CreateObject("ASPSimpleUpload.Upload")
It is saying :

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

Am I missing something? A DLL perhaps?

----------------------------------------------------------------------------

Option Explicit

Dim upl, NewFileName

Set upl = Server.CreateObject("ASPSimpleUpload.Upload")

If Len(upl.Form("File1")) > 0 Then
NewFileName = "/Upload/" & upl.ExtractFileName(upl.Form("File1"))
If upl.SaveToWeb("File1", NewFileName) Then
Response.Write("File successfully written to disk.")
Else
Response.Write("There was an error saving the file to disk.")
End If
End If
%>

<html><head><title>ASP Simple Upload Example #1</title></head></title>
<body>
<form method="POST" action="test.Asp" enctype="multipart/form-data">
Select a file to upload: <input type="file" name="File1" size="30">
<input type="submit" name="submit" value="Upload Now">
</form>
</body>
</html>
Jul 22 '05 #1
2 7122
Yes, you are missing the ASP Simple UPload component. You must get that
(purchase it? Maybe it's free? Not sure) and install it on the server
before you can use it.

Okay, as it turns out, this is the component from a company that's gone.
You'll have to go with a different component that still exists. You can
find some upload options here: http://www.aspfaq.com/show.asp?id=2189

Ray at work
"SU_Oran" <dt*******@hotmail.com> wrote in message
news:e8**************@TK2MSFTNGP15.phx.gbl...
I found this when searching. I need to have a simple script that will
upload a single file.
It is giving me an error on Set upl =
Server.CreateObject("ASPSimpleUpload.Upload")
It is saying :

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

Am I missing something? A DLL perhaps?

-------------------------------------------------------------------------- --
Option Explicit

Dim upl, NewFileName

Set upl = Server.CreateObject("ASPSimpleUpload.Upload")

If Len(upl.Form("File1")) > 0 Then
NewFileName = "/Upload/" & upl.ExtractFileName(upl.Form("File1"))
If upl.SaveToWeb("File1", NewFileName) Then
Response.Write("File successfully written to disk.")
Else
Response.Write("There was an error saving the file to disk.")
End If
End If
%>

<html><head><title>ASP Simple Upload Example #1</title></head></title>
<body>
<form method="POST" action="test.Asp" enctype="multipart/form-data">
Select a file to upload: <input type="file" name="File1" size="30">
<input type="submit" name="submit" value="Upload Now">
</form>
</body>
</html>

Jul 22 '05 #2
Thank you sir.
"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:uK**************@TK2MSFTNGP09.phx.gbl...
Yes, you are missing the ASP Simple UPload component. You must get that
(purchase it? Maybe it's free? Not sure) and install it on the server
before you can use it.

Okay, as it turns out, this is the component from a company that's gone.
You'll have to go with a different component that still exists. You can
find some upload options here: http://www.aspfaq.com/show.asp?id=2189

Ray at work
"SU_Oran" <dt*******@hotmail.com> wrote in message
news:e8**************@TK2MSFTNGP15.phx.gbl...
I found this when searching. I need to have a simple script that will
upload a single file.
It is giving me an error on Set upl =
Server.CreateObject("ASPSimpleUpload.Upload")
It is saying :

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

Am I missing something? A DLL perhaps?


--------------------------------------------------------------------------
--

Option Explicit

Dim upl, NewFileName

Set upl = Server.CreateObject("ASPSimpleUpload.Upload")

If Len(upl.Form("File1")) > 0 Then
NewFileName = "/Upload/" & upl.ExtractFileName(upl.Form("File1"))
If upl.SaveToWeb("File1", NewFileName) Then
Response.Write("File successfully written to disk.")
Else
Response.Write("There was an error saving the file to disk.")
End If
End If
%>

<html><head><title>ASP Simple Upload Example #1</title></head></title>
<body>
<form method="POST" action="test.Asp" enctype="multipart/form-data">
Select a file to upload: <input type="file" name="File1" size="30">
<input type="submit" name="submit" value="Upload Now">
</form>
</body>
</html>


Jul 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Willoughby Bridge | last post: by
2 posts views Thread by Chuck | last post: by
3 posts views Thread by Fred Nelson | last post: by
7 posts views Thread by pbd22 | last post: by
reply views Thread by wasif | last post: by
24 posts views Thread by owz2008 | last post: by
reply views Thread by NPC403 | last post: by
3 posts views Thread by gieforce | last post: by
reply views Thread by fmendoza | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.