Aurigma Forums
»
Upload Suite
»
FAQ – ActiveX/Java Uploader
»
Text is displayed instead of Image Uploader control/applet
Rank: Newbie
Groups: Member
Joined: 1/3/2008(UTC) Posts: 3
|
I've got several problems with the ImageUploader component. First problem.. If i go to the site, with an IE7 browser wich doesn't have the component installed yet, i will get the following message: Quote:Image Uploader ActiveX control is necessary to upload your files quickly and easily. You will be able to select multiple images in user-friendly interface instead of clumsy input fields with Browse button. Installation will take up to few minutes, please be patient. To install Image Uploader, please click on the Information Bar. After page reload click "Yes" when you see the control installation dialog. But there won't show an informationbar. So i can't install the component (fails on both IE7 on XP and Vista). If the component is installed, it works perfectly, uploading files is no problem. I use the following javascript to load the component (after the user presses a button on my site): Code:function loadUploader() {
var iu = new ImageUploaderWriter("ImageUploader1", 650, 400);
//For ActiveX control full path to CAB file (including file name) should be specified.
iu.activeXControlCodeBase = "../bin/ImageUploader4.cab";
iu.activeXControlVersion = "4,5,50,0";
//For Java applet only path to directory with JAR files should be specified (without file name).
iu.javaAppletCodeBase = "http://fotoplatform.nl/";
iu.javaAppletCached = false;
iu.javaAppletVersion = "2.5.50.0";
iu.showNonemptyResponse = "off";
//Configure appearance.
iu.addParam("PaneLayout", "TwoPanes");
iu.addParam("ShowDebugWindow", "true");
iu.addParam("AllowRotate", "false");
iu.addParam("BackgroundColor", "#ffffff");
//Configure thumbnail settings.
iu.addParam("UploadThumbnail1FitMode", "Fit");
iu.addParam("UploadThumbnail1Width", "200");
iu.addParam("UploadThumbnail1Height", "200");
iu.addParam("UploadThumbnail1JpegQuality", "70");
//Configure URL files are uploaded to.
iu.addParam("Action", "upload.aspx?guid=" + ProjectJson.project.guid)
iu.addParam("LicenseKey", "0000-0000-0000-0000;0000-0000-0000-0000");
//Configure URL where to redirect after upload.
//iu.addParam("RedirectUrl", "gallery.aspx")
//Tell Image Uploader writer object to generate all necessary HTML code to embed
//Image Uploader to the page.
//iu.writeHtml();
dojo.byId("uploadcontainer").innerHTML = iu.getHtml();
}
(ofcourse with the correct licensekey). Next problem is that in Firefox, the component will load, but at the end of uploading i get the following warning message: Quote:Image Uploader encountered some problem. If you see this message, contact web master. In java console it talkts about an invalid uri... But the same uri works perfectly in IE? Quote:Aurigma ImageUploader version: 2.5.50.0 Current document URL: http://fotoplatform.nl/default.aspxReading cookies Reading referer Referer: http://fotoplatform.nl/default.aspxReading additional form content Uploading to http://fotoplatform.nl/upload.aspx?guid={4b93ca4a-b8f4-432c-8fb0-0a9c0d7dce14} Setting HTTP params: Host=fotoplatform.nl Exception occured
Exception class: class java.lang.IllegalArgumentException
Invalid uri '/upload.aspx?guid={4b93ca4a-b8f4-432c-8fb0-0a9c0d7dce14}': Invalid query
java.lang.IllegalArgumentException: Invalid uri '/upload.aspx?guid={4b93ca4a-b8f4-432c-8fb0-0a9c0d7dce14}': Invalid query at org.apache.commons.httpclient.HttpMethodBase.<init>(Unknown Source) at org.apache.commons.httpclient.methods.ExpectContinueMethod.<init>(Unknown Source) at org.apache.commons.httpclient.methods.EntityEnclosingMethod.<init>(Unknown Source) at org.apache.commons.httpclient.methods.PostMethod.<init>(Unknown Source) at com.aurigma.imageuploader.upload.c.b(Unknown Source) at com.aurigma.imageuploader.upload.c.c(Unknown Source) at com.aurigma.imageuploader.upload.c.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
getResponseBodyAsString:4 ###Error occured### Status=[ERROR] Progress=[0] ValueMax=[0] Value=[0] [ErrorPage] [EndOfErrorPage] Thank you in advance, with best regards, Bart Ubels Edited by user Friday, January 11, 2008 3:10:17 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
Hello Bart,
When you see this text instead of Image Uploader, it means that Image Uploader cannot be installed for some reason. Normally the common user see it when they reject Image Uploader installation, but in your case most likely the reason is that it just cannot find the Image Uploader binaries.
Make sure that the URL you specify in iu.activeXControlCodeBase is valid and the CAB file is downloadable.
The same is for Java version with the only difference - iu.javaAppletCodeBase should specify an URL of the folder where JAR files are located (rather than of the JAR file itself).
|
|
|
|
Rank: Newbie
Groups: Member
Joined: 1/7/2008(UTC) Posts: 3
|
It's totally normal to get this message if you test on a Windows 2003 platform (ActiveX are disabled by default).
|
|
|
|
Rank: Advanced Member
Groups: Member, Administration Joined: 8/2/2003(UTC) Posts: 876
Thanks: 2 times Was thanked: 27 time(s) in 27 post(s)
|
Yuri, thanks for your input. Indeed, if security policy restricts a user to install ActiveX, this text will be displayed as well. By the way, if you want to give the user better instructions, or translate it, use the following properties of ImageUploaderWriter: Quote:iu.instructionsEnabled=true;
iu.instructionsCommon="Image Uploader ActiveX control is necessary to upload "+ "your files quickly and easily. You will be able to select multiple images "+ "in user-friendly interface instead of clumsy input fields with Browse button. "+ "Installation will take up to few minutes, please be patient. To install Image Uploader, ";
iu.instructionsNotWinXPSP2="please reload page and select \"Yes\" button " + "when you will see control installation dialog."
iu.instructionsWinXPSP2="please click on Information Bar. After page reloading select \"Yes\"" + "when you will see control installation dialog.";
See more information about this here: http://www.aurigma.com/docs/iu/...ference.htm#instructionsBy the way, you can insert any HTML/JavaScript here. Edited by user Wednesday, October 29, 2008 2:01:06 PM(UTC)
| Reason: Not specified
|
|
|
|
Rank: Newbie
Groups: Member
Joined: 1/3/2008(UTC) Posts: 3
|
Thank you for your help. It was a security error, because the /bin/ directory was more secured than the root of the site... I'm trying to solve the firefox problem now
|
|
|
|
Rank: Newbie
Groups: Member
Joined: 1/3/2008(UTC) Posts: 3
|
The problem is solved in firefox too now.. I used an incorrect uri... I used curly brackets {} but those are preserved characters for uri's. Used the following javascript: Code:function loadUploader() {
var iu = new ImageUploaderWriter("ImageUploader1", 650, 400);
//For ActiveX control full path to CAB file (including file name) should be specified.
iu.activeXControlCodeBase = "http://fotoplatform.nl/ImageUploader4.cab";
iu.activeXControlVersion = "4,6,11,0";
//For Java applet only path to directory with JAR files should be specified (without file name).
iu.javaAppletCodeBase = "http://fotoplatform.nl/";
iu.javaAppletCached = false;
iu.javaAppletVersion = "2.6.11.0";
iu.showNonemptyResponse = "off";
//Configure appearance.
iu.addParam("PaneLayout", "TwoPanes");
iu.addParam("ShowDebugWindow", "true");
iu.addParam("AllowRotate", "false");
iu.addParam("BackgroundColor", "#ffffff");
//Configure thumbnail settings.
iu.addParam("UploadThumbnail1FitMode", "Fit");
iu.addParam("UploadThumbnail1Width", "200");
iu.addParam("UploadThumbnail1Height", "200");
iu.addParam("UploadThumbnail1JpegQuality", "70");
//Configure URL files are uploaded to.
iu.addParam("Action", "http://fotoplatform.nl/upload.aspx?guid=" + Url.encode(ProjectJson.project.guid));
iu.addParam("LicenseKey", "0000-0000-0000-0000;0000-0000-0000-0000");
//Configure URL where to redirect after upload.
//iu.addParam("RedirectUrl", "gallery.aspx")
//Tell Image Uploader writer object to generate all necessary HTML code to embed
//Image Uploader to the page.
//iu.writeHtml();
dojo.byId("uploadcontainer").innerHTML = iu.getHtml();
}
/**
*
* URL encode / decode
* http://www.webtoolkit.info/
*
**/
var Url = {
// public method for url encoding
encode : function (string) {
return escape(this._utf8_encode(string));
},
// public method for url decoding
decode : function (string) {
return this._utf8_decode(unescape(string));
},
// private method for UTF-8 encoding
_utf8_encode : function (string) {
string = string.replace(/\r\n/g,"\n");
var utftext = "";
for (var n = 0; n < string.length; n++) {
var c = string.charCodeAt(n);
if (c < 128) {
utftext += String.fromCharCode(c);
}
else if((c > 127) && (c < 2048)) {
utftext += String.fromCharCode((c >> 6) | 192);
utftext += String.fromCharCode((c & 63) | 128);
}
else {
utftext += String.fromCharCode((c >> 12) | 224);
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
utftext += String.fromCharCode((c & 63) | 128);
}
}
return utftext;
},
// private method for UTF-8 decoding
_utf8_decode : function (utftext) {
var string = "";
var i = 0;
var c = c1 = c2 = 0;
while ( i < utftext.length ) {
c = utftext.charCodeAt(i);
if (c < 128) {
string += String.fromCharCode(c);
i++;
}
else if((c > 191) && (c < 224)) {
c2 = utftext.charCodeAt(i+1);
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
i += 2;
}
else {
c2 = utftext.charCodeAt(i+1);
c3 = utftext.charCodeAt(i+2);
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
i += 3;
}
}
return string;
}
}
This will load the component at the moment you call the loadUploader() function. This is called when the user presses a button. And thus drasticly improves the loading time of the website. Edited by user Friday, January 11, 2008 3:10:47 PM(UTC)
| Reason: Not specified
|
|
|
|
Aurigma Forums
»
Upload Suite
»
FAQ – ActiveX/Java Uploader
»
Text is displayed instead of Image Uploader control/applet
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.