Forums
This topic is locked
prlblems asp uplodad filename
Posted 14 Oct 2005 16:30:22
1
has voted
14 Oct 2005 16:30:22 Mauro Schiappelli posted:
I have problem with session file name beacus not save it! why??? thi is my code.... sigh help me please<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../ScriptLibrary/incPureUpload.asp" -->
<%
'*** Pure ASP File Upload 2.1.9
Dim GP_uploadAction,UploadQueryString
PureUploadSetup
If (CStr(Request.QueryString("GP_upload") <> "" Then
Dim pau_thePath,pau_Extensions,pau_Form,pau_Redirect,pau_storeType,pau_sizeLimit,pau_nameConflict,pau_requireUpload,pau_minWidth,pau_minHeight,pau_maxWidth,pau_maxHeight,pau_saveWidth,pau_saveHeight,pau_timeout,pau_progressBar,pau_progressWidth,pau_progressHeight
pau_thePath = """upload/user"""
pau_Extensions = ""
pau_Form = "segnalanews"
pau_Redirect = "segnalainvia.asp"
pau_storeType = "file"
pau_sizeLimit = ""
pau_nameConflict = "uniq"
pau_requireUpload = "false"
pau_minWidth = ""
pau_minHeight = ""
pau_maxWidth = ""
pau_maxHeight = ""
pau_saveWidth = ""
pau_saveHeight = ""
pau_timeout = "6000"
pau_progressBar = "fileCopyProgress.htm"
pau_progressWidth = "300"
pau_progressHeight = "100"
Dim RequestBin, UploadRequest
CheckPureUploadVersion 2.19
ProcessUpload pau_thePath,pau_Extensions,pau_Redirect,pau_storeType,pau_sizeLimit,pau_nameConflict,pau_requireUpload,pau_minWidth,pau_minHeight,pau_maxWidth,pau_maxHeight,pau_saveWidth,pau_saveHeight,pau_timeout
end if
If (CStr(Request.QueryString("GP_upload") <> "" Then
Session("filename1" = UploadFormRequest("file1"
Session("filename2" = UploadFormRequest("file2"
Session("filename3" = UploadFormRequest("file3"
Session("filename4" = UploadFormRequest("file4"
Session("filename5" = UploadFormRequest("file5"
end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<title>Le news</title>
<script language="JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#"!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<script language="JavaScript">
<!--
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape"&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?")>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}
//-->
</script>
<META NAME="Author" Content="PS Digital Image & Web design e-mail<img src=../images/dmxzone/forum/icon_smile_tongue.gif border=0 align=middle> ">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<script language="javascript" src="../ScriptLibrary/incPureUpload.js"></script>
</HEAD>
<BODY BGCOLOR="787878" onLoad="MM_preloadImages('../immagini/back2.gif','../immagini/home2.gif','../immagini/eng2.gif')" link="#333333" vlink="#666666">
<CENTER>
<P>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" width="560">
<tr>
<td width="109" valign="bottom" height="25"> </td>
<td colspan="2"></td>
<td><a name="top"></a></td>
<td valign="bottom" rowspan="2"><img src="../immagini/logotop.gif" width="206" height="31"></td>
</tr>
<tr>
<td valign="bottom" width="109">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="54"><a href="javascript:history.go(-1)" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image16','','../immagini/back2.gif',1)"><img name="Image16" border="0" src="../immagini/back.gif" width="54" height="31"></a></td>
<td width="1"><img src="../immagini/filo.gif" width="1" height="31"></td>
<td><a href="../italiano/index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image15','','../immagini/home2.gif',1)"><img name="Image15" border="0" src="../immagini/home.gif" width="54" height="31"></a></td>
</tr>
</table>
</td>
<td valign="bottom" width="54"><a href="../inglese/index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image12','','../immagini/eng2.gif',1)"><img name="Image12" border="0" src="../immagini/eng1.gif" width="54" height="31"></a></td>
<td valign="bottom" width="101"><img src="../immagini/filo_101.gif" width="101" height="1"></td>
<td valign="bottom"><img src="../immagini/filo_90.gif" width="90" height="1"></td>
</tr>
</table>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" width="560">
<tr align="center">
<td colspan="3" height="24" bgcolor="#343150"><font size="2" face="Verdana, Arial, Helvetica" color="#FFFFFF"><b>Segnala
una News</b></font>
</tr>
<tr>
<td colspan="3" bgcolor="#CCCCCC" valign="top">
<table width="100%" border="0" cellpadding="5" cellspacing="1">
<tr valign="top" bgcolor="#EBE8C0">
<td colspan="2" bgcolor="#EBE8C0">
<form action="<%=GP_uploadAction%>" method="post" enctype="multipart/form-data" name="segnalanews" onSubmit="return verifica(this);;checkFileUpload(this,'',false,'','','','','','','');showProgressWindow('fileCopyProgress.htm',300,100);return document.MM_returnValue">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr valign="top">
<td colspan="2"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">La
descrizione dell'allegato corrisponde al testo linkato al file.<br>
I tempi di caricamento variano a seconda della connessione.<br>
Terminato l'upload cambierà automaticamente pagina. </font></td>
</tr>
<tr valign="top">
<td width="23%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
<td width="77%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
</tr>
<tr valign="top">
<td><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Allegato 1 </font></strong></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<INPUT NAME='file1' TYPE=FILE id="file1" onChange="checkOneFileUpload(this,'',false,'','','','','','','')" SIZE=40>
</font></td>
</tr>
<tr valign="top">
<td width="23%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
<td width="77%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
</tr>
<tr valign="top">
<td><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Allegato
2</font></strong></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<INPUT NAME='file2' TYPE=FILE id="file2" onChange="checkOneFileUpload(this,'',false,'','','','','','','')" SIZE=40>
</font></td>
</tr>
<tr valign="top">
<td width="23%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
<td width="77%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
</tr>
<tr valign="top">
<td><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Allegato
3</font></strong></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<INPUT NAME='file3' TYPE=FILE id="file3" onChange="checkOneFileUpload(this,'',false,'','','','','','','')" SIZE=40>
</font></td>
</tr>
<tr valign="top">
<td width="23%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
<td width="77%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
</tr>
<tr valign="top">
<td><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Allegato
4</font></strong></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<INPUT NAME='file4' TYPE=FILE id="file4" onChange="checkOneFileUpload(this,'',false,'','','','','','','')" SIZE=40>
</font></td>
</tr>
<tr valign="top">
<td width="23%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
<td width="77%"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
</tr>
<tr valign="top">
<td><strong><font size="1" face="Verdana, Arial, Helvetica, sans-serif">Allegato
5</font></strong></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<INPUT NAME='file5' TYPE=FILE id="file5" onChange="checkOneFileUpload(this,'',false,'','','','','','','')" SIZE=40>
</font></td>
</tr>
<tr valign="top">
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> </font></td>
</tr>
<tr valign="top">
<td colspan="2"> <div align="center">
<font size="1" face="Verdana, Arial, Helvetica, sans-serif">
<input type="reset" name="Submit" value="Ripristina">
<input name="cmd" type="submit" id="cmd" value="salva allegati">
</font></div></td>
</tr>
</table>
<input name="id" type="hidden" id="id" value="<%
If (CStr(Request.QueryString("GP_upload") = "" Then
id = Request.QueryString("id"
Response.Write id
End if
%>">
</form>
</td>
</tr>
</table>
</td>
</tr>
<TR>
<TD colspan="3" bgcolor="#FFFFFF"></TD>
</tr>
</table>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" width="560">
<TR>
<TD colspan="3" valign="top" bgcolor="#809999"></td></TR>
<tr align="right">
<td width="330" height="20" background="../immagini/righino_card.gif">
<div align="left"><font size="1" color="#FFFFFF" face="Verdana, Arial, Helvetica"> Ultimo
aggiornamento: 22 Dicembre 2004 </font></div>
</td>
<td width="230" height="20" background="../immagini/righino_card.gif"><font size="1" color="#FFFFFF" face="Verdana, Arial, Helvetica"><b>©
2001 Centro CARDIOLOGICO Monzino</b></font> </td>
</TR>
</TABLE>
</CENTER>
<map name="Map">
<area shape="rect" coords="2,1,60,69" href="../italiano/news/archive.htm">
</map>
</BODY>
</HTML>
Replies
Replied 14 Oct 2005 16:32:52
14 Oct 2005 16:32:52 Mauro Schiappelli replied:
i make file name as unique and i want saved file names
Replied 14 Oct 2005 17:13:40
14 Oct 2005 17:13:40 Mauro Schiappelli replied:
i rewrite it in: but no ok gulp!!!!
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../ScriptLibrary/incPureUpload.asp" -->
<%
'*** Pure ASP File Upload 2.1.9
Dim GP_uploadAction,UploadQueryString
PureUploadSetup
If (CStr(Request.QueryString("GP_upload") <> "" Then
Dim pau_thePath,pau_Extensions,pau_Form,pau_Redirect,pau_storeType,pau_sizeLimit,pau_nameConflict,pau_requireUpload,pau_minWidth,pau_minHeight,pau_maxWidth,pau_maxHeight,pau_saveWidth,pau_saveHeight,pau_timeout,pau_progressBar,pau_progressWidth,pau_progressHeight
pau_thePath = """upload/user"""
pau_Extensions = ""
pau_Form = "segnalanews"
pau_Redirect = "segnalainvia.asp"
pau_storeType = "file"
pau_sizeLimit = ""
pau_nameConflict = "uniq"
pau_requireUpload = "false"
pau_minWidth = ""
pau_minHeight = ""
pau_maxWidth = ""
pau_maxHeight = ""
pau_saveWidth = ""
pau_saveHeight = ""
pau_timeout = "6000"
pau_progressBar = "fileCopyProgress.htm"
pau_progressWidth = "300"
pau_progressHeight = "100"
Dim RequestBin, UploadRequest
CheckPureUploadVersion 2.19
ProcessUpload pau_thePath,pau_Extensions,pau_Redirect,pau_storeType,pau_sizeLimit,pau_nameConflict,pau_requireUpload,pau_minWidth,pau_minHeight,pau_maxWidth,pau_maxHeight,pau_saveWidth,pau_saveHeight,pau_timeout
end if
If (CStr(Request.QueryString("GP_upload") <> "" Then
Session("file1" = UploadFormRequest("file1"
Session("file2" = UploadFormRequest("file2"
Session("file3" = UploadFormRequest("file3"
Session("file4" = UploadFormRequest("file4"
Session("file5" = UploadFormRequest("file5"
End If
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../ScriptLibrary/incPureUpload.asp" -->
<%
'*** Pure ASP File Upload 2.1.9
Dim GP_uploadAction,UploadQueryString
PureUploadSetup
If (CStr(Request.QueryString("GP_upload") <> "" Then
Dim pau_thePath,pau_Extensions,pau_Form,pau_Redirect,pau_storeType,pau_sizeLimit,pau_nameConflict,pau_requireUpload,pau_minWidth,pau_minHeight,pau_maxWidth,pau_maxHeight,pau_saveWidth,pau_saveHeight,pau_timeout,pau_progressBar,pau_progressWidth,pau_progressHeight
pau_thePath = """upload/user"""
pau_Extensions = ""
pau_Form = "segnalanews"
pau_Redirect = "segnalainvia.asp"
pau_storeType = "file"
pau_sizeLimit = ""
pau_nameConflict = "uniq"
pau_requireUpload = "false"
pau_minWidth = ""
pau_minHeight = ""
pau_maxWidth = ""
pau_maxHeight = ""
pau_saveWidth = ""
pau_saveHeight = ""
pau_timeout = "6000"
pau_progressBar = "fileCopyProgress.htm"
pau_progressWidth = "300"
pau_progressHeight = "100"
Dim RequestBin, UploadRequest
CheckPureUploadVersion 2.19
ProcessUpload pau_thePath,pau_Extensions,pau_Redirect,pau_storeType,pau_sizeLimit,pau_nameConflict,pau_requireUpload,pau_minWidth,pau_minHeight,pau_maxWidth,pau_maxHeight,pau_saveWidth,pau_saveHeight,pau_timeout
end if
If (CStr(Request.QueryString("GP_upload") <> "" Then
Session("file1" = UploadFormRequest("file1"
Session("file2" = UploadFormRequest("file2"
Session("file3" = UploadFormRequest("file3"
Session("file4" = UploadFormRequest("file4"
Session("file5" = UploadFormRequest("file5"
End If