Rank: Member
Groups: Member
Joined: 11/13/2007(UTC) Posts: 2
|
Thanks George. But I still not able to upload pdf file after I update the applet version and UploadThumbnail1FallbackMode instead of UploadThumbnailNFallbackMode. And remove the NonImagesThumbnailMode. The file that was uploaded is the pdf system icon rather than original pdf source file. Here is the updated source code: Code://For ActiveX control full path to CAB file (including file name) should be specified.
iu.activeXControlCodeBase = "../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 = "../";
iu.javaAppletCached = true;
iu.javaAppletVersion = "2.5.50.0";
iu.showNonemptyResponse = "off";
//Configure appearance and behaviour.
iu.addParam("PaneLayout", "ThreePanes");
iu.addParam("FolderPaneHeight", "200");
iu.addParam("ShowDebugWindow", "true");
iu.addParam("AllowMultipleRotate", "true");
iu.addParam("AllowMultipleRemove", "true");
//change text of send button
iu.addParam("ButtonSendText", "Upload");
//text description for each photo
iu.addParam("EditDescriptionText", "Edit...");
iu.addParam("MaxDescriptionTextLength", "36");
iu.addParam("PreviewThumbnailSize", "64");
//iu.addParam("DeleteUploadedFiles", "true");
//iu.addParam("QualityMeterFormats", "4x6 inches,1800,1200,1.2;6x8 inches,2400,1800,1.25;");
//Configure Image Uploader to rotate photos automatically
//according to the orientation stored in EXIF metadata.
iu.addParam("EnableAutoRotate", "true");
//Append the form with total file size to the upload.
iu.addParam("AdditionalFormName", "Form1");
//Configure file mask to upload JPEG images only.
iu.addParam("FileMask", "*.jpeg;*.jpg;*.jpe;*.pdf;");
//Set image size restrictions.
iu.addParam("MinImageWidth", "250");
iu.addParam("MinImageHeight", "190");
//Exclude the source file from upload because only
//resized versions of the photo will be sent.
//iu.addParam("UploadSourceFile", "false");
//iu.addParam("NonImagesThumbnailMode","SourceFile");
iu.addParam("UploadThumbnail1FallbackMode", "SourceFile");
//iu.addParam("UploadThumbnail2FallbackMode", "SourceFile");
//Configure settings of the optimized image. Optimized image
//is resized to 600x600 with JPEG quality = 60 and EXIF
//metadata is preserved.
//iu.addParam("UploadThumbnail1FitMode", "Fit");
//iu.addParam("UploadThumbnail1Width", "250");
//iu.addParam("UploadThumbnail1Height", "190");
//iu.addParam("UploadThumbnail1JpegQuality", "90");
iu.addParam("UploadThumbnail1CopyExif", "true");
//Configure thumbnail settings.
iu.addParam("UploadThumbnail2FitMode", "ActualSize");
iu.addParam("UploadThumbnail2Width", "75");
iu.addParam("UploadThumbnail2Height", "75");
iu.addParam("UploadThumbnail2JpegQuality", "60");
iu.addParam("UploadSourceFile", "false");
//iu.addParam("NonImagesThumbnailMode", "SourceFile");
iu.addParam("UploadThumbnail1FitMode", "ActualSize");
iu.addParam("UploadThumbnail1Width", "150");
iu.addParam("UploadThumbnail1Height", "150");
iu.addParam("UploadThumbnail1JpegQuality", "100");
//Configure user quota restriction. In real-life application these values should be
//loaded from server.
//this restriction is at the client end, not the server end.
iu.addParam("MaxFileCount", "<%= iCount%>");
iu.addParam("MaxTotalFileSize", "52428800");
iu.addParam("MessageMaxFileCountExceededText", "You can only select <%=iCount%> photo for your profile.");
//Configure URL files are uploaded to.
iu.addParam("Action", "<%=GetUploadUrl()%>");
//Add event handlers.
iu.addEventListener("UploadFileCountChange", "ImageUploader_UploadFileCountChange");
iu.addEventListener("Progress", "ImageUploader_Progress");
//Tell Image Uploader writer object to generate all necessary HTML code to embed
//Image Uploader to the page.
iu.writeHtml();
Edited by user Monday, February 25, 2008 1:19:18 PM(UTC)
| Reason: Not specified
|