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

Notification

Icon
Error

Options
Go to last post Go to first unread
hastur  
#1 Posted : Monday, August 14, 2006 10:07:40 PM(UTC)
hastur

Rank: Member

Groups: Member
Joined: 8/14/2006(UTC)
Posts: 3

I am evaluating Image Uploader for a customer of mine. In all the available documentation it says that it allows drag and drop. When i try to drag and drop I get the following message box:

Adding files with drag & drop can not be implemented in the standard version due to security reasons. However it can be enabled in private-label version.
For more information please contact us at sales@aurigma.com

I am using the MultipleDescriptions example which I have modified to ThreePanes PaneLayout.
Drag and drop functionality and multiple descriptions are both crucial to my customer.

-Am I doing something wrong?
-What is a private-label version?
Alex Makhov  
#2 Posted : Tuesday, August 15, 2006 1:51:41 PM(UTC)
Alex Makhov

Rank: Advanced Member

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

Hello,

Drag and drop is allowed while dropping to the Image Uploader (inner or outer) upload pane. For example one can drop a file in ThreePanes mode from folder pane (the upper one) to the upload pane (lower one). As about MultipleDescriptions sample Image Uploader does not allow the user to drop files to the custom pane because of security reasons. You could order the private label version with this feature enabled which would be used on your site only.
Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
Robi  
#3 Posted : Tuesday, August 29, 2006 5:03:44 AM(UTC)
Robi

Rank: Member

Groups: Member
Joined: 8/29/2006(UTC)
Posts: 5

Hi Alex,

I'm looking to deploy a custom view of upload pane similar to Multiple description upload sample. Like described earlier in this post, you seem to tell there is a possibility of having a private label version of Image Uploader Dual, how is it possible?

Thanks.
Phil
xiaomantoularry  
#4 Posted : Tuesday, August 29, 2006 7:37:58 AM(UTC)
xiaomantoularry

Rank: Member

Groups: Member
Joined: 8/28/2006(UTC)
Posts: 11


The "ServerImaging" sample does allow you to "drag and drop" a photo into the uploader pane.
Not sure why this one does not need a 'private' label.



Fedor  
#5 Posted : Tuesday, August 29, 2006 10:02:22 AM(UTC)
Fedor

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 7/28/2003(UTC)
Posts: 1,548

Thanks: 5 times
Was thanked: 59 time(s) in 58 post(s)
Only multiple descriptions sample doesn't allow drag & drop, as it uses custom upload pane.
Best regards,
Fedor Skvortsov
xiaomantoularry  
#6 Posted : Tuesday, August 29, 2006 10:21:52 AM(UTC)
xiaomantoularry

Rank: Member

Groups: Member
Joined: 8/28/2006(UTC)
Posts: 11

it is possible to have multiple description for each file, even using the default ( not custom) uploader pane?

xiaomantoularry  
#7 Posted : Tuesday, August 29, 2006 3:04:12 PM(UTC)
xiaomantoularry

Rank: Member

Groups: Member
Joined: 8/28/2006(UTC)
Posts: 11

The java applet version is not really stable, especially when using the custom upload pane (for multiple description field purpose). In custom upload pane mode, Only the 1st uploading works, the rest always got some sort of java exception.

The default three-pane layout is much stable in applet version - I have tried uploading many files in both Firefox and Netscape browser for many times and it did not pose a single issue, but the one thing we really need is to add an extra field for each image (in the addition to the standard Description).

Please suggest a way to achieve this without using the custom upload pane.
Robi  
#8 Posted : Friday, September 1, 2006 12:50:57 AM(UTC)
Robi

Rank: Member

Groups: Member
Joined: 8/29/2006(UTC)
Posts: 5

Could someone from Aurigma give us an answer to my question about private-label component version?

Xiaomantoularry also asked for suggestion to find a workaround to this issue, someone could help us?

We are going in production in a month and realizing after purchasing the component that it can't support drag & drop with custom view we will publish...quick answer please!

Thanks.
Alex Makhov  
#9 Posted : Friday, September 1, 2006 7:36:02 PM(UTC)
Alex Makhov

Rank: Advanced Member

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

Hello,

Private label version is possible. Feel free to write to sales@aurigma.com regarding this question. Custom upload pane is not a part of Image Uploader. It is made with JavaScript. As about the Server Imaging sample, there is no Custom Upload Pane.

Multiple descriptions could be made in Custom Upload Pane only, but drag and drop is not available between Image Uploader and Custom Upload Pane.

Hope I have answered all your questions.
Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
FamiJam  
#10 Posted : Saturday, December 16, 2006 10:14:17 PM(UTC)
FamiJam

Rank: Member

Groups: Member
Joined: 12/16/2006(UTC)
Posts: 3

Is there a way to customize the message that is sent when someone tries to do the drag and drop? I would rather it not be a message meant for an administrator, but just a simple, "drag and drop is not yet supported" message.

Also, can you give us an idea of how much it would cost to get this functionality with multiple description? I think so many people want it, that you should just make it part of the standard package, and include the files that are different in the sample code folder for multiple descriptions.

Thanks
Rob

<a href="http://www.GoOffCampus.com">Student Housing</a> | <a href="http://www.manageyourlinks.com">SEO Link Management</a> | <a href="http://www.famijam.com">Family Photo Sharing</a>
Alex Makhov  
#11 Posted : Sunday, December 17, 2006 1:05:00 PM(UTC)
Alex Makhov

Rank: Advanced Member

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

Hello Rob,

Here is a part of code of script.js file of MultipleDescriptions sample:
Code:
function processDragDrop(){
	alert("Adding files with drag & drop can not be implemented in standard version due security reasons. However it can be enabled in private-label version."+
		"\r\n\r\nFor more information please contact us at sales@aurigma.com");
	if (imageUploader1){
		//imageUploader1.AddToUploadList();
	}
}

You can change it to anything you want.

As about enabling DnD feature, it is possible in private label versions only. We don’t allow the files addition via script because of security reasons that’s why we don’t add such functionality to the standard version. If you want to have this feature in your private label version feel free to contact sales@aurigma.com.

Edited by user Thursday, May 22, 2008 9:24:24 PM(UTC)  | Reason: Not specified

Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
FamiJam  
#12 Posted : Sunday, December 17, 2006 10:01:24 PM(UTC)
FamiJam

Rank: Member

Groups: Member
Joined: 12/16/2006(UTC)
Posts: 3

^^ Thanks, after looking in the script file, I figured that out as well.

One other question though, not really related to this thread, but its something I am coming across.

I am trying to do database inserts within the for loop in upload.php to keep track of each individual photo.

I am having problems getting it to work, and I cannot seem to figure out why. Just to make sure I am not being dumb here, there should be no problems with the upload.php page performing a $_GET['x'] and reading a cookie ($_COOKIE['ID']) as part of the script, right? I tested my implementation with the xml, and it worked fine, and then when I tested with the mysql script, it didnt save any photos to the folder, nor did it insert anything into the database...

In this code, I am trying to save the image and the thumbnail into the same directory, which is based on a users ID and the Album ID ... the thumbnail is just named t-file.jpg to differentiate the two.

Code:
<?php require_once('../Connections/file.php'); ?>
<?php

function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}

//if(isset($_COOKIE['UserID'])){
//$thisUser = $_COOKIE['UserID'];
$colname_rsPermit = "-1";
if (isset($_GET['AID'])) {
  $colname_rsPermit = (get_magic_quotes_gpc()) ? $_GET['AID'] : addslashes($_GET['AID']);
}else header("Location: ../index.html");

mysql_select_db($database_famijam, $famijam);
$query_rsPermit = sprintf("SELECT * FROM ualbum WHERE intUAlbumID = %s", $colname_rsPermit);
$rsPermit = mysql_query($query_rsPermit, $famijam) or die(mysql_error());
$row_rsPermit = mysql_fetch_assoc($rsPermit);
$totalRows_rsPermit = mysql_num_rows($rsPermit);

$thisUser = $row_rsPermit['intUserID'];

//if($totalRows_rsPermit>1){

//This variable specifies relative path to the folder, where the gallery with uploaded files is located.
//Do not forget about the slash in the end of the folder name.


$galleryPath = "users/".$thisUser."/".$_GET['AID']."/";

$absGalleryPath = realpath($galleryPath) . "/";
$absThumbnailsPath = realpath($galleryPath) . "/";

function saveUploadedFiles()
{
	global $absGalleryPath, $absThumbnailsPath, $thisUser;
	
	//First of all, clear files and data uploaded at previous time.
	
	//Delete source files.
	//$handle = opendir($absGalleryPath);

	//while (false !== ($file = readdir($handle)))
	//{
	//	if (is_file($absGalleryPath . $file))
	//	{
	//		unlink($absGalleryPath . $file);
	//	}
	//}
	//closedir($handle); 

	//Delete thumbnails
	//$handle = opendir($absThumbnailsPath);	
	//while (false !== ($file = readdir($handle))) 
	//{
	//	if (is_file($absThumbnailsPath . $file))
	//	{
	//		unlink($absThumbnailsPath . $file);
	//	}
	//}
	//closedir($handle);

	//NOTE: If you do not want to delete previously uploaded files, just 
	//remove or comment out the code above.
	
	//Create XML file which will keep information about files (image dimensions, description, etc). 
	//XML is used solely for brevity. In real-life application most likely you will use database instead.
	//$descriptions = new DOMDocument('1.0');
	//$descriptions->appendChild($descriptions->createElement("files"));
	
	//Get total number of uploaded files (all files are uploaded in a single package).
	$fileCount = $_POST ["FileCount"];
	
	//Iterate through uploaded data and save the original file, thumbnail, and description.
	for ($i = 1; $i <= $fileCount; $i++)
	{
		
		
		
		//Get the first thumbnail and save it to disk. It stores 640x480 optimized image.
		$thumbnail1Field = "Thumbnail1_" . $i;
		if (!$_FILES[$thumbnail1Field]['size'])
		{
			return;	
		}
		$fileName = getSafeFileName(basename($_POST["FileName_" . $i]));		
		move_uploaded_file($_FILES[$thumbnail1Field]['tmp_name'], $absGalleryPath . "/" . $fileName);

		//$totalUploadedFileSize = $totalUploadedFileSize + filesize($absGalleryPath . "/" . $fileName);

		//Get the second thumbnail and save it to disk. It stores 88x66 preview image. 
		$thumbnail2Field = "Thumbnail2_" . $i;
		if (!$_FILES[$thumbnail2Field]['size'])
		{
			return;	
		}
		move_uploaded_file($_FILES[$thumbnail2Field]['tmp_name'], $absGalleryPath . "/t-" . $fileName);
		
		// Insert Pic info into database
		
		$insertSQL = sprintf("INSERT INTO upics (upicName, upicTitle, upicDesc, intUserID, upitWidth, upicHeight, intUAlbumID) VALUES (%s, %s, %s, %s, %s, %s, %s)",
                       GetSQLValueString($fileName, "text"),
                       GetSQLValueString($_POST ['Title_' . $i], "text"),
                       GetSQLValueString($_POST ['Description_' . $i], "text"),
                       GetSQLValueString($thisUser, "int"),
					   GetSQLValueString($_POST ['Width_' . $i], "int"),
					   GetSQLValueString($_POST ['Height_' . $i], "int"),
                       GetSQLValueString($_GET['AID'], "int"));

    	mysql_select_db($database_famijam, $famijam);
    	$Result1 = mysql_query($insertSQL, $famijam) or die(mysql_error());
		//Get first thumbnail (the single thumbnail in this code sample) and save it to disk.
		//$thumbnail1Field = "Thumbnail1_" . $i;
		//if (!$_FILES[$thumbnail1Field]['size'])
		//{
		//	return;	
		//}
		//move_uploaded_file($_FILES[$thumbnail1Field]['tmp_name'], $absGalleryPath . "/Thumbnails/" . $fileName . ".jpg");

		//Save file info.
		//$xmlFile = $descriptions->createElement("file");
		//$xmlFile->setAttribute("name", $fileName);
		//$xmlFile->setAttribute("width", $_POST ['Width_' . $i]);
		//$xmlFile->setAttribute("height", $_POST ['Height_' . $i]);
		//$xmlFile->setAttribute("title", $_POST ['Title_' . $i]);		
		//$xmlFile->setAttribute("description", $_POST ['Description_' . $i]);
		//$descriptions->documentElement->appendChild($xmlFile);
	}

	//$descriptions->save($absGalleryPath . "Descriptions.xml");
}

//This method verifies whether file with such name already exists 
//and if so, construct safe filename name (to avoid collision).	
function getSafeFileName($fileName)
{
	global $absGalleryPath;
	
	$newFileName = $fileName;
	$j = 1;
	while (file_exists($absGalleryPath . "/" . $newFileName))
	{
		$newFileName = $j . "_" . $fileName;
		$j = $j + 1;
	}
	return $newFileName;	
}

saveUploadedFiles();

// }

 mysql_free_result($rsPermit);

//}
?>



If you could help me track down the problem, I would appreciate it...

Edited by user Tuesday, December 18, 2007 7:40:07 PM(UTC)  | Reason: Not specified

Rob

<a href="http://www.GoOffCampus.com">Student Housing</a> | <a href="http://www.manageyourlinks.com">SEO Link Management</a> | <a href="http://www.famijam.com">Family Photo Sharing</a>
Alex Makhov  
#13 Posted : Friday, December 22, 2006 2:51:56 PM(UTC)
Alex Makhov

Rank: Advanced Member

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

Hello,

Did you solve this problem?

There is no standard PHP sample about how to add the data to the database. You could change the standard sample step by step to check where the reason of the problem is.
Sincerely yours,
Alex Makhov

UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
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.