upload af billeder
jeg har fundet dettet script på en Support side på mit webhotel.. men kan ikke få det til at virke.. måske er det bare en sti der skal rettes eller en mappe der mangler???<%
Set Upload = Server.CreateObject("Persits.Upload.1")
Upload.OverwriteFiles = False
On Error Resume Next
Upload.SetMaxSize 1048576 ' Limit files to 1MB
Count = Upload.Save("c:\upload")
%>
<HTML>
<BODY BGCOLOR="#FFFFFF">
<CENTER>
<% If Err <> 0 Then %>
<FONT SIZE=3 FACE="Arial" COLOR=#0020A0>
<H3>The following error occured while uploading:</h3>
</FONT>
<FONT SIZE=3 FACE="Arial" COLOR=#FF2020>
<h2>"<% = Err.Description %>"</h2>
</FONT>
<FONT SIZE=2 FACE="Arial" COLOR="#0020A0">
Please <A HREF="http://www.aspupload.com/livedemo.asp">try again</A>.
</FONT>
<% Else %>
<FONT SIZE=3 FACE="Arial" COLOR=#0020A0>
<h2>Success! <% = Count %> file(s) have been uploaded.</h2>
</FONT>
<FONT SIZE=3 FACE="Arial" COLOR=#0020A0>
<TABLE BORDER=1 CELLPADDING=3 CELLSPACING=0>
<TD><B>Image:</B></TD>
<% If Count > 0 Then %>
<%
Set File = Upload.Files(1)
If File.ImageType = "GIF" or File.ImageType = "JPG" or File.ImageType = "PNG" Then %>
<TD ALIGN=CENTER><IMG SRC="/uploaddir/<% = File.FileName%>"><BR><% = File.OriginalPath%><BR>
(<% = File.ImageWidth %> x <% = File.ImageHeight %> pixels)
</TD>
<% Else %>
<TD><% = File.OriginalPath %></TD>
<% End If %>
<% Else %>
<TD>File not selected.</TD>
<% End If %>
<TR>
<TD><B>Description:</B></TD><TD><% = Upload.Form("Description") %> </TD><TR>
<TD><B>Categories:</B></TD>
<TD>
<%
For Each Item in Upload.Form
If Item.Name = "Category" Then Response.Write Item.Value & "<BR>"
Next
%>
</TD>
</TABLE>
</FONT>
<P>
<FONT SIZE=2 FACE="Arial" COLOR=#0020A0>
Click <A HREF="demo2.asp">here</A> to upload more files.
</FONT>
<% End If %>
<HR>
<FONT SIZE=2 FACE="Arial" COLOR=#0020A0>
<A HREF="http://www.persits.com/aspupload.exe">Download</A> your trial copy of AspUpload.
<P>
<A HREF="http://www.aspupload.com">Back to AspUpload.com</A>.
</FONT>
</CENTER>
</BODY>
</HTML>
