Welcome Guest! You need to login or register to make posts.

Notification

Icon
Error

Options
Go to last post Go to first unread
mixersoft  
#1 Posted : Thursday, November 2, 2006 9:09:45 AM(UTC)
mixersoft

Rank: Member

Groups:
Joined: 9/25/2006(UTC)
Posts: 10

I'm trying to build a 2 phase upload where I can filter the selected thumbnails on the server based on EXIF params before uploading the actual files. However, I'm having a problem with UncheckUploadedFiles.

Before the thumbnail upload, I have set:

Code:
iu.addParam("UncheckUploadedFiles", "false");

But after the thumbnails have successfully uploaded, I try to filter during the "status=complete"

event. However a call to alert("Upload file count="+iu.getUploadFileCount()); shows that the iu.getUploadFileCount()==0.

After filtering, I can de-select the files I don't want.

Any ideas?

Edited by user Tuesday, February 19, 2008 5:01:42 PM(UTC)  | Reason: Not specified

Alex Makhov  
#2 Posted : Thursday, November 2, 2006 1:02:17 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups:
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

What version of Image Uploader do you use?

Could you show your full page code?

Sincerely yours,

Alex Makhov

UserPostedImage Follow Aurigma on Twitter!

mixersoft  
#3 Posted : Thursday, November 2, 2006 5:47:45 PM(UTC)
mixersoft

Rank: Member

Groups:
Joined: 9/25/2006(UTC)
Posts: 10

Hi,

I am using these 2 versions of IU:

- ImageUploaderAx4058_CabOnly.zip

- ImageUploaderJe2070_JarOnly.zip

And here is the script from my page:

Code:
<script type="text/javascript">	
				
//<![CDATA[
//Create JavaScript object that will embed Image Uploader to the page.
var iu = new ImageUploaderWriter("ImageUploader1", 550, 490);

//For ActiveX control full path to CAB file (including file name) should be specified.
iu.activeXControlCodeBase = "javascripts/ImageUploader4.cab";
iu.activeXControlVersion = sc.activeXControlVersion;

//For Java applet only path to directory with JAR files should be specified (without file name).
//iu.javaAppletCodeBase = "javascripts/";
iu.javaAppletCodeBase = "../javascripts/";
//sc.javaAppletCodeBase = "M:/dev/haystack2/Haystack/public/javascripts/";
iu.javaAppletCached = true;
iu.javaAppletVersion = sc.javaAppletVersion;

iu.showNonemptyResponse = "off";

//Configure appearance and behaviour.
iu.addParam("PaneLayout", "TwoPanes");
iu.addParam("FolderView", "Details");
//iu.addParam("FolderView", "Details");
iu.addParam("UploadView", "Details");
iu.addParam("PreviewThumbnailSize", "100");
iu.addParam("ShowButtons", "false");
iu.addParam("ShowSubfolders", "true");
iu.addParam("ShowDescriptions", "false");
iu.addParam("ShowContextMenu", "true");
iu.addParam("ShowDebugWindow", "true");
iu.addParam("AllowMultipleRotate", "true");

//Configure colors.
iu.addParam("PaneBackgroundColor", "#ffffff");
iu.addParam("BackgroundColor", "#ffffff");
iu.addParam("PreviewThumbnailActiveColor", "#f8b330");
iu.addParam("PreviewThumbnailInactiveColor", "#eeeeee");

//Hide tree pane.
iu.addParam("TreePaneWidth", "-1");

//Allow upload not only files, but also entire folders.
//iu.addParam("AllowFolderUpload", "true");

//Single or multiple file selection.
//iu.addParam("AllowMultipleSelection", "false");

//Link ImageUploader with ShellComboBox.
iu.addParam("AdditionalFolderNavigator", "ImageUploader1");


//Configure file mask to display images only.
iu.addParam("FileMask", "*.jpg;*.jpeg;*.jpe;*.gif;*.png;*.tif;*.tiff;*.psd");

// Config EXIF Settings
iu.addParam("ExtractExif", "ExifDateTime;ExifDateTimeOriginal;ExifCopyright;ExifGpsDateStamp;ExifGpsLatitudeRef;ExifGpsLatitude;ExifGpsLongitudeRef;ExifGpsLongitude;ExifImageDescription;ExifImageUniqueID;ExifOrientation;ExifRelatedSoundFile;ExifUserComment;ExifSubjectLocation;ExifSubjectArea;ExifMake;ExifModel;");
iu.addParam("ExtractIptc", "IptcByline;IptcCredit;IptcSource;IptcDateCreated;IptcCopyrightNotice;IptcCaption;IptcSpecialInstructions;IptcKeyword;");



//Configure thumbnail settings.
iu.addParam("UploadThumbnail1Width", "32");
iu.addParam("UploadThumbnail1Height", "32");
iu.addParam("UploadThumbnail1JpegQuality", "60");
//iu.addParam("UploadThumbnail1CopyExif", "true");

//Configure upload settings.
iu.addParam("Action", "upload");
iu.addParam("FilesPerOnePackageCount", "5");
iu.addParam("AutoRecoverMaxTriesCount", "3");
iu.addParam("AutoRecoverTimeOut", "10000");

//Configure Image Uploader to rotate photos automatically 
//according to the orientation stored in EXIF metadata.
iu.addParam("EnableAutoRotate", "true");
//#TODO: source images are not rotated, thumbnails are

//Append the form with total file size to the upload.  
//iu.addParam("AdditionalFormName", "Form1");

//Whichcraft Prepare
iu.addParam("UploadThumbnail1FitMode", "fit");
iu.addParam("UploadThumbnail1CopyExif", "true");
iu.addParam("AllowFolderUpload", "true");
iu.addParam("UncheckUploadedFiles", "false");
iu.addParam("UploadSourceFile", "false");



//Add event handlers.
iu.addEventListener("UploadFileCountChange", "ImageUploader_UploadFileCountChange");
iu.addEventListener("Progress", "ImageUploader_Progress");
iu.addEventListener("BeforeUpload", "ImageUploader_BeforeUpload");


iu.fullPageLoadListenerName = "FullPageLoad";

//Tell Image Uploader writer object to generate all necessary HTML code to embed 
//Image Uploader to the page.
iu.writeHtml();
//]]>
				</script>
				
				
	<script type="text/javascript">
//<![CDATA[	
//This UploadFileCountChange event handler displays total size of all files selected for upload.
function ImageUploader_UploadFileCountChange(){
	var imageUploader1 = getImageUploader("ImageUploader1");
	if (imageUploader1){
		document.getElementById("TotalSourceFileSize").value = Math.ceil(imageUploader1.getTotalFileSize() / 1024);
	}
}

//This Progress event handler demonstrates an alternative way to 
//redirect upon upload (instead of RedirectUrl property).

function ImageUploader_send() 
{
    setTimeout("getImageUploader('ImageUploader1').Send()", 500);
}

var WasUpload = false;
//var WasUpload = true;
function ImageUploader_Progress(Status, Progress, ValueMax, Value, StatusText)
{

	if (Status=="COMPLETE")
	{
       alert('preparing to filter selection list');
       if (WasUpload)
	   {
    		WasUpload = false;
            document.getElementById('btnUpload').innerHTML=('Find');			
    		window.location = 'gallery'; 
    		return;
	   }
	   // Remove unwanted files from upload list

    var iu = getImageUploader("ImageUploader1");
    alert("Upload file count="+iu.getUploadFileCount());
    value = getImageUploader("ImageUploader1").getUncheckUploadedFiles();
    alert("UncheckUploadedFiles="+value);
 /* 
      
	   // During next upload source files will be sent
	   iu.setUploadSourceFile("true");
	   iu.setUncheckUploadedFiles("true");
	   iu.setUploadThumbnail1FitMode("Fit");
	   WasUpload = true;
       document.getElementById('btnUpload').innerHTML=('SharePhotos');	   
       
*/         
      
    }
} 


function ImageUploader_BeforeUpload() {
    alert("Before upload event");
    var iu = getImageUploader("ImageUploader1");
    iu.setUncheckUploadedFiles("false");
    value = getImageUploader("ImageUploader1").getUncheckUploadedFiles();
    alert("UncheckUploadedFiles="+value);
    alert("BeforeUpload file count="+iu.getUploadFileCount());
}

//]]>
	</script>

Edited by user Tuesday, February 19, 2008 5:02:02 PM(UTC)  | Reason: Not specified

Alex Makhov  
#4 Posted : Wednesday, November 8, 2006 5:09:05 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups:
Joined: 8/3/2003(UTC)
Posts: 998

So does the problem occur while using both versions of Image Uploader (ActiveX and Java)?

You could try to change your ImageUploader_send method code to the following:

Code:
function ImageUploader_send() 
{
    getImageUploader("ImageUploader1").setUncheckUploadedFiles("false");
    setTimeout("getImageUploader('ImageUploader1').Send()", 500);
}

Edited by user Tuesday, February 19, 2008 5:02:50 PM(UTC)  | Reason: Not specified

Sincerely yours,

Alex Makhov

UserPostedImage Follow Aurigma on Twitter!

mixersoft  
#5 Posted : Monday, November 13, 2006 10:32:13 AM(UTC)
mixersoft

Rank: Member

Groups:
Joined: 9/25/2006(UTC)
Posts: 10

Quote:

Code:
function ImageUploader_send() 
{
    getImageUploader("ImageUploader1").setUncheckUploadedFiles("false");
    setTimeout("getImageUploader('ImageUploader1').Send()", 500);
}

I just made the changes suggested above and tried it out. On IE7 with ActiveX, the problem is the same -- getUploadFileCount()=0 and getUncheckUploadedFiles=false after the first upload.

I also just downloaded the latest Java runtime, and for some reason the Java client is not working properly. For example, only the "My Documents" and "Desktop" buttons appear, and I get an error during the first upload.

Any thoughts?

Edited by user Tuesday, February 19, 2008 5:02:36 PM(UTC)  | Reason: Not specified

Alex Makhov  
#6 Posted : Tuesday, November 21, 2006 1:33:02 PM(UTC)
Alex Makhov

Rank: Advanced Member

Groups:
Joined: 8/3/2003(UTC)
Posts: 998

Hello,

Sorry for the long delay.

I have checked your code with the build of Image Uploader we have sent you before. It works as it should be. So make sure you are using the version we have sent you.

Sincerely yours,

Alex Makhov

UserPostedImage Follow Aurigma on Twitter!

Users browsing this topic
Guest
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.