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

Notification

Icon
Error

Options
Go to last post Go to first unread
eastwop  
#1 Posted : Sunday, June 22, 2008 8:08:25 AM(UTC)
eastwop

Rank: Newbie

Groups: Member
Joined: 6/22/2008(UTC)
Posts: 1

Just purchased the dual version but am having a heck of a time uploading images to the server. For some reason I am unable process the uploaded image files (PHP). I am not getting any errors.

Thanks in advance for any help with this.

It doesnt appear as though my Action param is ever getting called.

http://bfglms.com/index/uploadimage

process-image
Code:

// Path to image files
$absPath = "/home/bfglms/domains/bfglms.com/public_html/images/temp";

if($_POST){
	//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 and thumbnail.
	for ($i = 1; $i <= $fileCount; $i++)
	{
	    //Get source file and save it to disk.
	    $sourceFileField = "SourceFile_" . $i;
	    $fileName = $_FILES[$sourceFileField]["name"];
	    move_uploaded_file($_FILES[$sourceFileField]["tmp_name"],$absPath . "/" . $fileName);
	
	    //Get first thumbnail (the single thumbnail in this code sample) and save it to disk.
	    $thumbnail1Field = "Thumbnail1_" . $i;
	    move_uploaded_file($_FILES[$thumbnail1Field]["tmp_name"],$absPath . "/Thumbnails/" . $fileName . ".jpg");
	}
}


uploadimage
Code:

<!--BEGIN-->
<!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>Leads And Contacts - Image Upload</title>
	<script type="text/javascript" src="/js/iuembed.js"></script>
	<link href="/css/imgLoader.css" type="text/css" rel="stylesheet" />
</head>
<body>

	<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 = "/images/ImageUploader5.cab";
iu.activeXControlVersion = "5,1,10,0";

//For Java applet only path to directory with JAR files should be specified (without file name).
iu.javaAppletJarFileName = "/images/ImageUploader5.jar";
iu.javaAppletCodeBase = "../";
iu.javaAppletCached = true;
iu.javaAppletVersion = "5.1.10.0";

iu.showNonemptyResponse = "off";

//Configure License Keys
iu.addParam("LicenseKey", "key;key");

//Configure appearance.
iu.addParam("PaneLayout", "TwoPanes");
iu.addParam("ShowDebugWindow", "true");
iu.addParam("AllowRotate", "false");
iu.addParam("BackgroundColor", "#ccccff");

//Configure thumbnail settings.
iu.addParam("UploadThumbnail1FitMode", "Fit");
iu.addParam("UploadThumbnail1Width", "800");
iu.addParam("UploadThumbnail1Height", "800");
iu.addParam("UploadThumbnail1JpegQuality", "60");


//Configure URL files are uploaded to.
iu.addParam("Action", "/index/process-image")

//Configure URL where to redirect after upload.
iu.addParam("RedirectUrl", "/index/uploadimage/")

//Tell Image Uploader writer object to generate all necessary HTML code to embed 
//Image Uploader to the page.
iu.writeHtml();
//]]>
	</script>

</body>
</html>
<!--END-->

Edited by user Sunday, June 22, 2008 8:36:41 AM(UTC)  | Reason: Not specified

Eugene Kosmin  
#2 Posted : Sunday, June 22, 2008 12:47:46 PM(UTC)
Eugene Kosmin

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 9/19/2006(UTC)
Posts: 439

Was thanked: 22 time(s) in 22 post(s)
Hi,

Please try to set up Action parameter in different ways:

Code:
iu.addParam("Action", "/index/process-image/upload.php");
iu.addParam("Action", " http://bfglms.com/index/process-image/upload.php");
iu.addParam("Action", " http://bfglms.com/index/process-image");
iu.addParam("Action", " process-image");

Best regards,
Eugene Kosmin.
Aurigma Development Team
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.