Aspuploadコンポーネントの解決策はないことがわかりました。ここに改善ソリューションを書きます!ありがとう
Aspuploadアップロードコンポーネント、ファイルの名前変更、進行状況バーの問題のソリューション!
合計4つのファイル、つまり1.asp、2.asp、bar.asp、framebar.aspがあります
最初のファイルを実行します:1.ASP、アップロード操作を実行します!
コードコピーは次のとおりです。
<%
''進行中のバー
dimspid、pid、barref
setuploadprogress = server.createObject( "persits.uploadprogress")
spid = uploagprogress.createprogressid()
pid = "pid ="&spid
barref = "framebar.asp?to = 10&"&pid
%>
<ScriptLanguage = "JavaScript">
<! -
functionshowprogress()
//進行状況バーの読み込み
{
strappversion = navigator.appversion;
if(document.upfile.filename.value!= "")
{
if(strappversion.indexof( 'msie')!= -1 && strappversion.substr(strappversion.indexof( 'msie')+5,1)> 4)
{
winstyle = "dialogwidth = 375px; dialogheight:175px; center:yes; status:no";
window.showmodelessdialog( '<%= barref%>&b = ie'、wind、winstyle);
}
それ以外
{
window.open( '<%= barref%>&b = nn'、 ''、 'width = 370、height = 165'、true);
}
}
returntrue;
}
functionispic(){
Vartemp;
varextlist = "。Jpg.gif.bmp.png.swf"; //クライアント、アップロード後にファイルタイプエラーを報告しないように、ファイルの接尾辞名を検出してください!
varfileName = upfile.filename.value;
varthe_ext = filename.substr(filename.lastindexof( "。")+1).tolowercase();
if(extlist.indexof(the_ext)== -1){
Alert(「画像ではなく、画像ファイルを選択してください!」);
ReturnFalse;
}
returntrue;
}
//->
</script>
<html>
<ヘッド> </head>
<body>
<formmethod = "post" enctype = "multipart/form-data" action = "2.asp?<%= pid%>" name = "upfile" onsubmit = "returnshowprogress();">
アップロードするファイルを選択します:<br>
<inputtype = filename = "filename"> <br>
<inputtype = submitValue = "upload" onclick = "returnispic()">
</form>
</body>