Forums
This topic is locked
File upload control
Posted 08 May 2006 18:36:45
1
has voted
08 May 2006 18:36:45 Michael McEachern posted:
Hi everybody.I am looking for instruction on file upload control for an asp page that hooks up to an SQL backend. Is this an easy process, or will I be forced to fork out some cash for this pleasure?
Thanks for any help at all!
Replies
Replied 12 May 2006 19:44:05
12 May 2006 19:44:05 Michael McEachern replied:
Been sifting through the Tutorials pages looking for anything to help out with limited luck. It seems that MS Frontpage has the control that I'm looking for already as a standard control. Why wouldn't Dreamweaver have the same as standard, I wonder?
Anyway, I found some help that looked promising using the following page with the form on it:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<TITLE>Please Upload Your File</TITLE>
</HEAD>
<BODY>
<form enctype="multipart/form-data" method="post" action="formresp.asp">
Enter filename to upload: <input type="file" name="f1"><br>
<input type="submit">
</form>
</BODY>
</HTML>
And then using this as the 'working page':
<%@ LANGUAGE="VBSCRIPT" %>
<HTML><HEAD>
<TITLE>Upload File Results</TITLE>
</HEAD>
<BODY>
Thank you for uploading your file.<br>
<% Set upl = Server.CreateObject("dsrUpload.FileUp" %>
<% upl.SaveAs "C:\temp\upload.out" %><BR>
Total Bytes Written: <%=upl.TotalBytes%>
</BODY>
</HTML>
But then I get an error when I try to upload:
Thank you for uploading your file.
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/DSRNovomix/formresp.asp, line 7
Invalid ProgID. For additional information specific to this message please visit the Microsoft Online Support site located at: www.microsoft.com/contentredirect.asp.
So I guess this means I need to configure something on my server to accept this type of request? Any thoughts? It's all a bit confusing and would love to have a straightforward answer if anyone has dealt with this type of thing before.
Cheers!
Anyway, I found some help that looked promising using the following page with the form on it:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<TITLE>Please Upload Your File</TITLE>
</HEAD>
<BODY>
<form enctype="multipart/form-data" method="post" action="formresp.asp">
Enter filename to upload: <input type="file" name="f1"><br>
<input type="submit">
</form>
</BODY>
</HTML>
And then using this as the 'working page':
<%@ LANGUAGE="VBSCRIPT" %>
<HTML><HEAD>
<TITLE>Upload File Results</TITLE>
</HEAD>
<BODY>
Thank you for uploading your file.<br>
<% Set upl = Server.CreateObject("dsrUpload.FileUp" %>
<% upl.SaveAs "C:\temp\upload.out" %><BR>
Total Bytes Written: <%=upl.TotalBytes%>
</BODY>
</HTML>
But then I get an error when I try to upload:
Thank you for uploading your file.
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
/DSRNovomix/formresp.asp, line 7
Invalid ProgID. For additional information specific to this message please visit the Microsoft Online Support site located at: www.microsoft.com/contentredirect.asp.
So I guess this means I need to configure something on my server to accept this type of request? Any thoughts? It's all a bit confusing and would love to have a straightforward answer if anyone has dealt with this type of thing before.
Cheers!