لقد وجدت أنه لا يوجد حل لمكون aspupload. سأكتب حل التحسين الخاص بي هنا! شكرًا لك
حلول لمكون تحميل aspupload ، إعادة تسمية الملف ، مشكلة شريط التقدم!
هناك 4 ملفات في المجموع ، وهي 1.asp ، 2.asp ، bar.asp ، framebar.asp
قم بتشغيل الملف الأول: 1.asp ، قم بإجراء عملية التحميل!
نسخة الكود كما يلي:
<٪
شريط التقدم
dimspid ، pid ، barref
setuploadprogress = server.createBject ("persits.uploadprogress")
spid = uploadprogress.createprogressid ()
pid = "pid =" & spid
barref = "frambar.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 ؛ المركز: نعم ؛ الحالة: لا" ؛
window.showmodelessDialog ('<٪ = barref ٪> & b = ie' ، window ، winstyle) ؛
}
آخر
{
Window.Open ('<٪ = barref ٪> & b = nn' ، '' ، 'width = 370 ، height = 165' ، true) ؛
}
}
عودة
}
functionispic () {
فارم
VarextList = ".
varfilename = upfile.filename.value ؛
varthe_ext = filename.substr (filename.lastindexof (".")+1) .ToLowerCase () ؛
if (extlist.indexof (the_ext) ==-1) {
تنبيه ("ليس صورة ، يرجى تحديد ملف الصورة!") ؛
ReturnFalse
}
عودة
}
//->
</script>
<html>
<head> </head>
<body>
<portMethod = "post" envenpe = "multipart/form-data" Action = "2.asp؟ <٪ = pid ٪>" name = "upfile" onsubmit = "returnshowprogress () ؛">
حدد الملف للتحميل: <br>
<inputType = filename = "filename"> <br>
<inputType = submitValue = "Upload" onClick = "returnispic ()">
</form>
</body>