Aspupload 구성 요소에 대한 해결책이 없다는 것을 알았습니다. 나는 여기에 내 개선 솔루션을 작성하겠습니다! 감사합니다
Aspupload 업로드 구성 요소, 파일 이름 변경, 진행률 표시 줄 문제에 대한 솔루션!
총 4 개의 파일, 즉 1.asp, 2.asp, bar.asp, framebar.asp가 있습니다.
첫 번째 파일을 실행하십시오 : 1.asp, 업로드 작업을 수행하십시오!
코드 사본은 다음과 같습니다.
<%
'' '진행률 바
Dimspid, PID, Barref
setUploadProgress = server.createObject ( "persits.uploadProgress")
spid = uploadProgress.createProgressId ()
pid = "pid ="& spid
barref = "framebar.asp? ~ = 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; 중심 : 예, 상태 : 아니오";
Window.showModelessDialog ( '<%= barref%> & b = IE', Window, Winstyle);
}
또 다른
{
window.open ( '<%= barref%> & b = nn', '', 'width = 370, 높이 = 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;
}
//->
</스크립트>
<html>
<헤드> </head>
<body>
<formmethod = "post"enctipe = "multipart/form-data"action = "2.asp? <%= pid%>"name = "upfile"onsubmit = "returnshowprogress ();">
업로드 할 파일을 선택하십시오. <br>
<inputtype = filename = "filename"> <br>
<inputtype = submitvalue = "upload"onclick = "returnispic ()">
</form>
</body>