Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - form fields when using ASPsimpleUploads
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

form fields when using ASPsimpleUploads

 Post Reply Post Reply
Author
snooper View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 23 April 2002
Location: Israel
Status: Offline
Points: 333
Post Options Post Options   Thanks (0) Thanks(0)   Quote snooper Quote  Post ReplyReply Direct Link To This Post Topic: form fields when using ASPsimpleUploads
    Posted: 30 December 2003 at 4:21pm

hey gang

rumour has it that form fields have to be accessed in a different way (from the usual request.form), when there is a file-field in the form.
does anyone know the syntax for ASPsimpleUpload?

many thanks!
Kn

Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 30 December 2003 at 11:38pm

<HTML>
<HEAD>
<TITLE>AspUpload Live Demo 1: Simple Uploads</TITLE>
</HEAD>
<BODY>

<B>Select 1, 2 or 3 files, then click the Upload button. Images (.gif, .jpg, .png)
will be automatically displayed.</B>
<P>

 <FORM NAME="MyForm" METHOD="POST" ENCTYPE="multipart/form-data"
  ACTION="upload1.asp">
 <TABLE CELLSPACING=0 CELLPADDING=3 BORDER=1>
 <TD BGCOLOR="#FFFFCC">
  <INPUT TYPE=FILE SIZE=40 NAME="FILE1"><BR>
  <INPUT TYPE=FILE SIZE=40 NAME="FILE2"><BR>
  <INPUT TYPE=FILE SIZE=40 NAME="FILE3"><BR>
  <INPUT TYPE=SUBMIT VALUE="Upload">
 
 </TD>
 </TABLE>
 </FORM>
</BODY>
</HTML>

upload1.asp

<%
 Set Upload = Server.CreateObject("Persits.Upload.1")

 Upload.OverwriteFiles = True
 On Error Resume Next

 'Upload.SetMaxSize 1048576 ' Limit files to 1MB
 Count = Upload.SaveVirtual("/Content/Pages/Documents")
%>
<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="../../../TEST/ASPupload/simpleupload/demo1.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>
<TH BGCOLOR="#FFFF00">Uploaded File</TH><TH BGCOLOR="#FFFF00">Size</TH><TH BGCOLOR="#FFFF00">Original Size</TH><TR>
<% For Each File in Upload.Files %>
 <% If File.ImageType = "GIF" or File.ImageType = "JPG" or File.ImageType = "PNG" Then %>
  <TD ALIGN=CENTER>
   <IMG SRC="/Content/Pages/Images/<% = File.FileName%>"><BR><B><% = File.OriginalPath%></B><BR>
   (<% = File.ImageWidth %> x <% = File.ImageHeight %> pixels)
  
  </TD>
 <% Else %>
  <TD><B><% = File.OriginalPath %></B>&nbsp;</TD>
 <% End If %>
 <TD ALIGN=RIGHT VALIGN="TOP"><% =File.Size %> bytes</TD>
 <TD ALIGN=RIGHT VALIGN="TOP"><% =File.OriginalSize %> bytes</TD><TR>
<% Next %>
</TABLE>
</FONT>
<P>
<% End If %>
</CENTER>
</BODY>
</HTML>

 



Edited by dpyers

Lead me not into temptation... I know the short cut, follow me.
Back to Top
snooper View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 23 April 2002
Location: Israel
Status: Offline
Points: 333
Post Options Post Options   Thanks (0) Thanks(0)   Quote snooper Quote  Post ReplyReply Direct Link To This Post Posted: 31 December 2003 at 1:46am
thanks, but thats not ASPimpleUpload
Back to Top
dpyers View Drop Down
Senior Member
Senior Member


Joined: 12 May 2003
Status: Offline
Points: 3937
Post Options Post Options   Thanks (0) Thanks(0)   Quote dpyers Quote  Post ReplyReply Direct Link To This Post Posted: 31 December 2003 at 6:37am
Arggggh.... You're right. It's the "Simple Upload: demo of ASPUplaod.

Lead me not into temptation... I know the short cut, follow me.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.