Ich fand, dass es keine Lösung für die Aspupload -Komponente gibt. Ich werde meine Verbesserungslösung hier schreiben! Danke
Lösungen für die Aspupload -Upload -Komponente, die Umbenennung von Dateien, das Problem der Fortschrittsleiste!
Insgesamt gibt es insgesamt 4 Dateien, nämlich 1.asp, 2.asp, bar.asp, Framebar.asp
Führen Sie die erste Datei aus: 1.asp, führen Sie den Upload -Vorgang aus!
Die Codekopie lautet wie folgt:
<%
'' 'Progress Bar
Dimspid, PID, Barref
SetUploadProgress = server.createObject ("PERSITS.UploadProgress"))
SPID = UploadProgress.CreateProgressid ()
Pid = "pid =" & spid
barref = "tourbar.asp? to = 10 &" & pid
%>
<criptuanguage = "javaScript">
<!-
FunktionshowProgress ()
// Fortschrittsbalken laden
{
stappversion = navigator.appversion;
if (document.upfile.filename.value! = "")
{
if (stappversion.indexof ('msie')! =-1 && stappversion.substr (stappversion
{
winstyle = "dialogwidth = 375px; dialogHeight: 175px; Mitte: Ja; Status: Nein";
window.showmodelessDialog ('<%= Barref%> & B = IE', Fenster, WinStyle);
}
anders
{
window.open ('<%= barref%> & b = nn', '', 'width = 370, Höhe = 165', true);
}
}
returnTrue;
}
functionispic () {
Vartemp;
varextlist = ". jpg.gif.bmp.png.swf"; // client, den Namen Datei -Suffix erkennen, um Dateien -Typ -Fehler nach dem Hochladen nicht zu melden!
varFileName = upFile.FileName.Value;
varthe_ext = Dateiname.substr (Dateiname.lastIndexof (".")+1) .tolowerCase ();
if (extlist.indexof (the_ext) ==-1) {
Alert ("Kein Bild, bitte wählen Sie die Bilddatei!");
returnfalse;
}
returnTrue;
}
//->
</Script>
<html>
<Head> </head>
<body>
<formMethod = "post" engType = "MultiPart/form-data" action = "2.asp? <%= pid%>" name = "UpFile" OnSubmit = "returnShowprogress ();">
Wählen Sie die zu hochgeladene Datei aus: <br>
<inputType = Dateiname = "Dateiname"> <br>
<InputType = subledValue = "Upload" onclick = "returnispic ()">
</form>
</body>