ERROR: Invalid Input
Hej eksperterJeg bruger multi-upload fra http://www.javaatwork.com/java-upload-applet/details.html, og stort set altid går det godt. Enkelte brugere vender dog tilbage med besked om, at de ikke kan bruge den - de får vist fejlen "ERROR: Invalid Input". Koden er:
<%
Uploadbruger = Request.QueryString("Id")
if not IsNumeric(Uploadbruger) then Response.Redirect "/error.asp"
Uploadbruger = replace(Uploadbruger,"'","")
Uploadmappeid = Request.QueryString("Mappeid")
if not IsNumeric(Uploadmappeid) then Response.Redirect "/error.asp"
Uploadmappeid = replace(Uploadmappeid,"'","")
%>
<meta HTTP-EQUIV="REFRESH" CONTENT="1; URL=http://www.mitdomæne.dk/admin1/upload/upload.asp?Id=<% Response.Write Session("Bruger") %>&Mappeid=<% Response.Write Uploadmappeid %>">
<div style="padding-top: 130px; padding-left: 150px;"><img border="0" src="/billeder/load.gif"></div>
Ovenstående er for at vise load-ikon, hvorefter uploadkoden er:
<%
Uploadbruger = Request.QueryString("Id")
if not IsNumeric(Uploadbruger) then Response.Redirect "/error.asp"
Uploadbruger = replace(Uploadbruger,"'","")
Uploadmappeid = Request.QueryString("Mappeid")
if not IsNumeric(Uploadmappeid) then Response.Redirect "/error.asp"
Uploadmappeid = replace(Uploadmappeid,"'","")
%>
<applet name="MyUploader"
code="javaatwork.myuploader.UploadApplet.class"
archive="myuploader-standard-signed-1.15.jar, labels.jar, labels_da.jar"
width="400" height="250">
<param name="uploadURL" value="uploadfile.asp?Id=<% Response.write Uploadbruger %>&Mappeid=<% Response.write Uploadmappeid %>">
<param name="successURL" value="upload.asp?Id=<% Response.write Uploadbruger %>&Mappeid=<% Response.write Uploadmappeid %>">
<param name="language" value="da">
<param name="maxImageSize" value="1050">
<param name="compressionQuality" value="92">
<param name="fileFilter" value="Image files (*.jpg, *.jpeg, *.png, *.gif): jpg, jpeg, png, gif">
<param name="maxByteSize" value="100">
<param name="maxFileSize" value="20">
<param name="uploadDirectories" value="false">
<param name="charsetForURLEncoding" value="ISO-8859-1">
<param name="codebase_lookup" value="false">
</applet>
<div style="padding-left: 6px; padding-top: 5px; font-family: Arial; font-size: 14px; text-align: left; color: #000;">Op til 20 billeder ad gangen (dog maks 100 MB)</div>
Det forekommer i forskellige browsere & versioner, uopdateret / opdateret java osv.
Håber virkelig, at nogle kan lure fejlen ;-)
På forhånd tak.