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

Notification

Icon
Error

Options
Go to last post Go to first unread
masood.ahmad  
#1 Posted : Tuesday, February 27, 2007 9:14:57 PM(UTC)
masood.ahmad

Rank: Member

Groups: Member
Joined: 2/27/2007(UTC)
Posts: 3

Hi,

I am using OnePane layout for ActiveX control. I want to add files and folders both. When i click the 'Add Folder' button and select a folder from the "Select Folder" dialogue. It puts the files of the selected folder in UploadList. I want to add the entire folder with "folder" itself in the UploadList. I have set the following param even then it is not working.

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

I will appriciate if i can get a quick answer. I need to finalize the evaluation of ImageUploader. Following is the list of all parameters i have set.

Code:
var iu = new ImageUploaderWriter("ImageUploader1", 650, 400);

//For ActiveX control full path to CAB file (including file name) should be specified.
iu.activeXControlCodeBase = "./ImageUploader4.cab";
iu.activeXControlVersion = "4,1,21,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.1.21.0";

iu.showNonemptyResponse = "off";

//Customize appearance and behavior.
iu.addParam("PaneLayout", "OnePane");
iu.addParam("UploadView", "Details");
iu.addParam("ShowDebugWindow", "true");
iu.addParam("EnableRotate", "false");
iu.addParam("BackgroundColor", "#ffffd6");

//Customize Image Uploader buttons.
iu.addParam("ButtonAddFoldersImageFormat", "Width=128;Height=25;UrlNormal='Images/AddFoldersNormal.png';UrlNormalFocused='Images/AddFoldersNormalFocused.png';UrlHover='Images/AddFoldersHover.png';UrlHoverFocused='Images/AddFoldersHoverFocused.png';UrlPressed='Images/AddFoldersPressed.png'");
iu.addParam("ButtonAddFilesImageFormat", "Width=109;Height=25;UrlNormal='Images/AddFilesNormal.png';UrlNormalFocused='Images/AddFilesNormalFocused.png';UrlHover='Images/AddFilesHover.png';UrlHoverFocused='Images/AddFilesHoverFocused.png';UrlPressed='Images/AddFilesPressed.png'");
iu.addParam("ButtonSendImageFormat", "Width=82;Height=25;UrlDisabled='Images/UploadDisabled.png';UrlNormal='Images/UploadNormal.png';UrlNormalFocused='Images/UploadNormalFocused.png';UrlHover='Images/UploadHover.png';UrlHoverFocused='Images/UploadHoverFocused.png';UrlPressed='Images/UploadPressed.png'");

//Configure custom button caching.
iu.addParam("CacheGuiGraphics","true");
iu.addParam("GuiGraphicsVersion","1");

//Compute and send for files SHA and MD5 hash.
iu.addParam("HashAlgorithm", "SHA;MD5");

//Configure upload settings.
iu.addParam("FilesPerOnePackageCount", "1");
iu.addParam("AutoRecoverMaxTriesCount", "1");
iu.addParam("AutoRecoverTimeOut", "1000");

//Configure URL files are uploaded to.
iu.addParam("Action", "upload.jsp");

//Configure URL where to redirect after upload.
iu.addParam("RedirectUrl", "gallery.jsp");

iu.addParam("AdditionalFolderNavigator", "ImageUploader");
iu.addParam("ShowSubfolders", "true");
iu.addParam("AllowFolderUpload", "true");

Edited by user Friday, February 22, 2008 5:12:07 PM(UTC)  | Reason: Not specified

Thanks & Regards,

Masood

Alex Makhov  
#2 Posted : Thursday, March 1, 2007 1:13:22 PM(UTC)
Alex Makhov

Rank: Advanced Member

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

Hello,

This feature is planned to be implemented in further releases.

Sincerely yours,

Alex Makhov

UserPostedImage Follow Aurigma on Twitter!

jethfo  
#3 Posted : Monday, June 11, 2007 12:58:21 AM(UTC)
jethfo

Rank: Member

Groups: Member
Joined: 6/11/2007(UTC)
Posts: 4

This is a feature my company will also benefit from. Has this feature been included in the latest release? If not, is there an estimated timeline on implementing this new feature? Our primary objective is to preserve the folder structure of uploaded files. Therefore, if a user selects an individual file it will show up in the uploadview as an individual file and will be uploaded into the root folder on the server. However, if a user selects an entire folder to upload only the folder will should up in the uploadview and the individual files will be uploaded to the server inside a subfolder of the root folder. Currently the individual files show up in the uploadview and the original folder structure is lost.

Thanks!

George Ulyanov  
#4 Posted : Monday, June 11, 2007 11:37:14 AM(UTC)
George Ulyanov

Rank: Advanced Member

Groups: Member
Joined: 7/26/2006(UTC)
Posts: 203

Hello,

Please see Open File Dialog sample. I think it is what you need in this case.

Edited by user Monday, October 27, 2008 11:39:09 PM(UTC)  | Reason: Not specified

Best regards,

George Ulyanov

jethfo  
#5 Posted : Tuesday, June 12, 2007 8:59:20 AM(UTC)
jethfo

Rank: Member

Groups: Member
Joined: 6/11/2007(UTC)
Posts: 4

Thanks for the tip. Unfortunately the sample you referred to does not accomplish what we need to do. We want the user to be able to browse through their local hard drive and select multiple folders and/or files to upload all at one time. This sample allows a user to browse through folders and select individual files within a single folder to be uploaded. The folders and/or files selected for upload should be displayed in the UploadView so the user has a visual representation of what will be uploaded.
George Ulyanov  
#6 Posted : Tuesday, June 12, 2007 12:05:36 PM(UTC)
George Ulyanov

Rank: Advanced Member

Groups: Member
Joined: 7/26/2006(UTC)
Posts: 203

If you need the folders to be shown then you should switch on ShowSubfolders and AllowFolderUpload properties.

Code:
iu.addParam("ShowSubfolders", "true");
iu.addParam("AllowFolderUpload", "true");

Edited by user Friday, February 22, 2008 5:15:47 PM(UTC)  | Reason: Not specified

Best regards,

George Ulyanov

jethfo  
#7 Posted : Friday, June 15, 2007 3:38:52 AM(UTC)
jethfo

Rank: Member

Groups: Member
Joined: 6/11/2007(UTC)
Posts: 4

I need the ability to upload multiple folders and to preserve the folder structure on uploaded

folders/files. According to your documentation this should be fairly simple to implement, but I have enabled the proper switches (as shown below) and it's not allowing folders to be uploaded. (see full code below).

Code:
iu.addParam("PaneLayout", "Three");
iu.addParam("FolderView", "Details");
iu.addParam("UploadView", "Details");
iu.addParam("ShowSubfolders", "true");
iu.addParam("AllowFolderUpload", "true");

Please let me know if there is something I am missing. Your help is greatly appreciated.

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Aurigma Image Uploader</title>

	<script type="text/javascript" src="./iuembed.js"></script>

	<link href="style.css" type="text/css" rel="stylesheet" />

	<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_Progress(Status, Progress, ValueMax, Value, StatusText){
	if (Status=="COMPLETE"){
		//alert('Upload 100%');
		window.location = 'upload2.php?order_id=<?=$order_id?>&order_type=<?=$order_type?>';  
	}
} 

function ImageUploader_ViewChange(){
	if (imageUploader1){
		document.getElementById("selectView").selectedIndex = parseInt(imageUploader1.getFolderView());
	}
}

function selectView_change(){
	if (imageUploader1){
		var selectView = document.getElementById("selectView");
		imageUploader1.setFolderView(parseInt(selectView.options[selectView.selectedIndex].value));
	}
}


//]]>
	</script>
</head>
<body>
	

<strong>
	Uploading Photos for Order #:
  <?=$order_id?>
<b><?=$title?></b>
	</strong>
  

<select id="selectView" onchange="selectView_change();">
														<option value="0" selected="selected">Thumbnails</option>
														<option value="1">Icons</option>
														<option value="2">List</option>
														<option value="3">Details</option>
													</select>
<!-- This form contains total size of source files in the upload list. -->
	<form id="Form1" name="Form1" action=".">
		


			Total source file size:
			<input id="TotalSourceFileSize" name="TotalSourceFileSize" type="text" readonly="readonly"
				value="0" size="7" />
			kb
		
	</form>

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

//For ActiveX control full path to CAB file (including file name) should be specified.
iu.activeXControlCodeBase = "./ImageUploader4.cab";
iu.activeXControlVersion = "4,1,60,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.1.60.0";

iu.showNonemptyResponse = "off";

//new features
iu.addParam("PaneLayout", "Three");
iu.addParam("FolderView", "Details");
iu.addParam("UploadView", "Details");
iu.addParam("ShowSubfolders", "true");
iu.addParam("AllowFolderUpload", "true");


//Configure appearance and behaviour.
//iu.addParam("PaneLayout", "OnePane");
//iu.addParam("UploadView", "List");
//iu.addParam("EnableRotate", "false");
//iu.addParam("ShowDebugWindow", "true");
//iu.addParam("ShowDescriptions", "false");
//iu.addParam("BackgroundColor", "#ffffff");
//iu.addParam("ShowSubfolders", "true");

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

//Drop Files Here Text
iu.addParam("DropFilesHereText", "Click Add Files or Add Folders button to add photos for this order.  Click Send after all photos are added here.");

//Switch that indicates whether Image Uploader should remember the last visited folder.
//iu.addParam("RememberLastVisitedFolder", "true");

//Customize Image Uploader buttons.
iu.addParam("ButtonAddFoldersImageFormat", "Width=128;Height=25;UrlNormal='Images/AddFoldersNormal.png';UrlNormalFocused='Images/AddFoldersNormalFocused.png';UrlHover='Images/AddFoldersHover.png';UrlHoverFocused='Images/AddFoldersHoverFocused.png';UrlPressed='Images/AddFoldersPressed.png'");
iu.addParam("ButtonAddFilesImageFormat", "Width=109;Height=25;UrlNormal='Images/AddFilesNormal.png';UrlNormalFocused='Images/AddFilesNormalFocused.png';UrlHover='Images/AddFilesHover.png';UrlHoverFocused='Images/AddFilesHoverFocused.png';UrlPressed='Images/AddFilesPressed.png'");
iu.addParam("ButtonSendImageFormat", "Width=82;Height=25;UrlDisabled='Images/UploadDisabled.png';UrlNormal='Images/UploadNormal.png';UrlNormalFocused='Images/UploadNormalFocused.png';UrlHover='Images/UploadHover.png';UrlHoverFocused='Images/UploadHoverFocused.png';UrlPressed='Images/UploadPressed.png'");

//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");

//Set image size restrictions.
iu.addParam("MinImageWidth", "5");
iu.addParam("MinImageHeight", "5");

//Exclude the source file from upload because only 
//resized versions of the photo will be sent.
iu.addParam("UploadSourceFile", "false");

//Configure settings of the optimized image. Optimized image
//is resized to 1200x1200 with JPEG quality = 60 and EXIF 
//metadata is preserved.
iu.addParam("UploadThumbnail1FitMode", "Fit");
iu.addParam("UploadThumbnail1Width", "1800");
iu.addParam("UploadThumbnail1Height", "1800");
iu.addParam("UploadThumbnail1JpegQuality", "60");
iu.addParam("UploadThumbnail1CopyExif", "true");

//Configure thumbnail settings.
iu.addParam("UploadThumbnail2FitMode", "Fit");
iu.addParam("UploadThumbnail2Width", "120");
iu.addParam("UploadThumbnail2Height", "120");
iu.addParam("UploadThumbnail2JpegQuality", "60");

//Configure URL files are uploaded to.
iu.addParam("Action", "upload.php?order_id=<?=$order_id?>&order_type=<?=$order_type?>");

//Add event handlers.
iu.addEventListener("UploadFileCountChange", "ImageUploader_UploadFileCountChange");
iu.addEventListener("ViewChange", "ImageUploader_ViewChange");
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();
//]]>
	</script>

</body>
</html>

Edited by user Friday, February 22, 2008 5:16:22 PM(UTC)  | Reason: Not specified

jethfo  
#8 Posted : Friday, June 15, 2007 2:26:39 PM(UTC)
jethfo

Rank: Member

Groups: Member
Joined: 6/11/2007(UTC)
Posts: 4

Problem Solved: The reason my script was not working is because folder uploads were not supported in the Java version of the previous release of the Image Uploader. Support for folder uploads has been included in the latest release from June 7th, 2007. No changes were required to my script after upgrading to the latest release. Everything works perfectly now. This is a very versatile tool and I will be purchasing it despite the lack of response to phone and email messages. Thanks!
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.