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

Notification

Icon
Error

Options
Go to last post Go to first unread
alexholte  
#1 Posted : Monday, March 9, 2009 8:05:29 AM(UTC)
alexholte

Rank: Newbie

Groups: Member
Joined: 3/3/2009(UTC)
Posts: 4

I've tried for a few days to get my imageuploader to work.

I'm having trouble saving the files.

The goal is to save the converted images after they are uploaded, which I think have managed, with the following code.

---------------- Code for my resizing ------------------

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

<script type="text/javascript">

var iu = new ImageUploaderWriter("ImageUploader", 623, 500);

//Configure License Keys

iu.addParam("LicenseKey", "71050-10000-FDFCC-DC8BA-E1DF6;72050-10000-54141-4BAFB-F039C");

//Max antal filer samt fil størrelser.

iu.addParam("MaxFileCount", "2");

iu.addParam("MaxFileSize", "3145728");

iu.addParam("MaxTotalFileSize", "10485760");

//Layout

iu.addParam("PaneLayout", "TwoPanes");

iu.addParam("AllowRotate", "true");

iu.addParam("UploadSourceFile", "false");

iu.addParam("UploadThumbnail1FitMode", "ActualSize");

//Configure colors.

iu.addParam("BackgroundColor", "#ffffff");

iu.addParam("SplitterLineColor", "#0066cc");

//Configure thumbnail settings.

iu.addParam("UploadThumbnail1FitMode", "Fit");

iu.addParam("UploadThumbnail1Width", "550");

iu.addParam("UploadThumbnail1Height", "413");

iu.addParam("UploadThumbnail1JpegQuality", "70");

//Configure URL where to redirect after upload.

iu.addParam("RedirectUrl", "index.php");

//Configure URL files are uploaded to.

iu.addParam("Action", "upload.php");

iu.writeHtml();

</script>

---------------- Code for my resizing ------------------

---------------- Code for my upload ------------------

<?php

//This variable specifies relative path to the folder, where the gallery

//with uploaded files is located.

$galleryPath = "gallery/";

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

//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 first thumbnail (the single thumbnail in this code sample) and save it to disk.

$thumbnail1Field = "Thumbnail1_" . $i;

move_uploaded_file($_FILES[$thumbnail1Field]["tmp_name"],

$absGalleryPath . "gallery/" . $fileName . ".jpg");

}

?>

---------------- Code for my upload ------------------

So what do i need to change or insert?

My site:

http://www.mitbarn.dk/imageuploader/index.php

Thanks

Alex

alexholte  
#2 Posted : Monday, March 9, 2009 9:50:56 AM(UTC)
alexholte

Rank: Newbie

Groups: Member
Joined: 3/3/2009(UTC)
Posts: 4

Hi all,

After 4 hours more i think I finaly have it under control.

Alex

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.