Browse discussions in Windows Installer Xml Group
Click here to read .Net and WiX articles
Dalun Software
What do you need today?
fileupload.asp
<%
' This file is provided as part of ASP Power Widgets Samples
'
' THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT
' WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED,
' INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
' OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
' PURPOSE.
' Copyright 1997-1998. All rights reserved.
' Dalun Software Inc. ASP Power Widgets
' http://www.dalun.com
' email: techsupport@dalun.com
' Revision History:
' 1.0.0 Initial
' 1.1.6 Added FormItem -> QueryString
' 1.1.7 Added ftx(refer to fileuploaded.asp) 1/20/99
' 1.1.8 Added fpx(refer to fileuploaded.asp), Changed UserDiskQuota from long to currency. 4/26/99
' 1.1.9 Added Reading registration code from fileupload.ini
' Added Saving uploaded files with a prefix or suffix. 5/15/99
' 1.1.10 Added Uploading to Blob field. 5/25/99
'You may have to change some parameters to run this asp file.
'In this demo fileupload.exe and fileupload.ini are put in the virtural
'directory of "/cgi-bin/".
'Please review fileupload.ini and update some parameters
'accordingly.
'Cook "FileUpload/intel-mmx-166" is used to exclude illegle uploading.
'In this sample files will be uploaded to C:\ResearchDept\Andrew.
'You can generate a different path for different users
'in your own application.
'Should you have any problem, suggestion or request, please write
'to techsupport@dalun.com.
'This cookie name and value should be same as that in fileupload.ini.
'This cookie is used by fileupload.exe
Response.Cookies("FileUpload") = "intel-mmx-166"
Response.Cookies("FileUpload").Path = "/"
'Don't change this cookie name, just change the cookie value accordingly.
'This cookie is used by fileupload.exe
Response.Cookies("FileUploadToWhere") = "C:\ResearchDept\Andrew\" 'Change it!!!
Response.Cookies("FileUploadToWhere").Path = "/"
'Don't change this cookie name, but you can change the value or simply remove this cookie.
'This cookie is used by fileupload.exe
'If there is no disk quota limit imposted, just set it as "".
Response.Cookies("UserDiskQuota") = "20000000" 'Change it!!!.
Response.Cookies("UserDiskQuota").Path = "/"
Response.Cookies("User") = "Andrew" 'Change this accordingly.
Response.Cookies("User").Path = "/"
'Cookie path:
'Now the cookie path is "/" , if you get a "cookie missing" error, please
'Change the cookie path.
%>
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
</HEAD>
<BODY>
<CENTER>
<H1>Upload Files</H1>
Please select files to upload.<P>
<!-- Change the path "/cgi-bin/" below, if needed -->
<!-- Don't Change any other things -->
<FORM ACTION ="/cgi-bin/fileUpload.exe" ENCTYPE ="multipart/form-data" METHOD ="post">
<!--you can specify file names to be saved on your web server
<FORM ACTION ="/cgi-bin/fileUpload.exe?ServerName1=abc.gif&ServerName2=abc.jpg" ENCTYPE ="multipart/form-data" METHOD ="post">
--->
<!-- following items can be deleted if you don't need these features.-->
<INPUT TYPE="Hidden" NAME="UploadFile1" value="File 1"><P>
<INPUT TYPE="Hidden" NAME="UploadFile2" value="File 2"><P>
<INPUT TYPE="Hidden" NAME="Palm Top" value="Cassiopeia's performance is good."><P>
<!-- Above form item "Palm Top" is just used to show you how to pass some values to fileuploaded.asp -->
<!-- You may add more or remove one of the input entries below -->
<!-- But you CAN NOT change the input type "FILE" -->
<!-- You CAN NOT use fnx, flx, ftx , fpx as any other form item name, where x is a number -->
<!-- Note: ft1 is UploadFile1, refer to fileuploaded.asp -->
<!-- Note: ft2 is UploadFile2, refer to fileuploaded.asp -->
<!-- You can use form items illustrated below to add a prefix and/or a suffix to
the filename of an uploaded file.
The uploaded file would be saved as: "uplPx" & "filename" & "uplSx"."file ext"
--->
<!-- You CAN NOT use uplPx, uplSx as any other form item name -->
<!-- Uncomment following lines to use the feature.
<INPUT TYPE=HIDDEN NAME="uplPx" VALUE="1_ ">
<INPUT TYPE=HIDDEN NAME="uplSx" VALUE=" _1">
--->
<INPUT TYPE="HIDDEN" NAME="Blob_ID" Value="<%=Request("Blob_ID")%>" >
<!--Note: INPUT TYPE="FILE" should be put last in a form ------->
<!-------------------------------------------------------------->
<INPUT TYPE="FILE" NAME="UploadFile1" SIZE=40>
<INPUT TYPE="FILE" NAME="UploadFile2" SIZE=40>
<p>
<INPUT TYPE="SUBMIT" value="Upload">
</FORM>
<p align="right"><a href="http://www.dalun.com"><font face="Verdana, Arial" size="1">Dalun Software, Inc. </font></a>
</BODY></HTML>
|
Click here to go back.