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