Hi everyone, I just recently downloaded the trial version of Image Uploader and looking to purchase the full product as soon as I get this product running successfully.
Im not totally sure if I have it setup correctly. I read up on forums trying figure out my problem but nothing is working for me currently.
Im doing all this through PHP.
So what I did:
I moved the files into my development environment. I created a file with the following code:
require_once('ImageUploader.class.php');
$imageUploader = new ImageUploader('ImageUploader1', 700,400);
$imageUploader->setLicenseKey('xxxx;yyyy');
//$imageUploader->addClientBeforeUpload('beforeUploadHandler');
$imageUploader->setAction('/do_upload');
$imageUploader->setUploadThumbnail1FitMode('Fit');
$imageUploader->setUploadThumbnail1Width(120);
$imageUploader->setUploadThumbnail1Height(120);
$imageUploader->render();
I have no problem with this the UI shows up.
On java console:
Cookies: PHPSESSID=1f735f0529fd8517440b1c92bdc60476; __utma=87055769.948831030.1251930607.1251930607.1251944983.2; __utmc=87055769; __utmz=87055769.1251930607.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utmb=87055769.2.10.1251944983
Reading referer
Referer:
http://www.site.dev/myaccountThu Sep 03 02:29:48 GMT 2009 JEP creating applet com.aurigma.imageuploader.ImageUploader (http://www.site.dev/java/imageuploader/ImageUploaderPHP/Scripts/)
Aurigma ImageUploader version: 6.1.1.0
Current document URL:
http://www.site.dev/myaccountReading cookies
Cookies: PHPSESSID=1f735f0529fd8517440b1c92bdc60476; __utma=87055769.948831030.1251930607.1251930607.1251944983.2; __utmc=87055769; __utmz=87055769.1251930607.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); __utmb=87055769.2.10.1251944983
Reading referer
Referer:
http://www.site.dev/myaccountViewing the Page source I notice that .AddCookies automatically gets generated so I dont need to code this part as i read through some posts:
<script type="text/javascript">
function ImageUploader1_PreserveHttpCookies(){
if (ImageUploader1_w.getControlType() == "Java")
getImageUploader("ImageUploader1").AddCookie('PHPSESSID=1f735f0529fd8517440b1c92bdc60476');
}
</script>
So now I select a file to upload and click Send:
One problem I am getting is that I get logged out. Not right away but when I refresh the page. I get no errors either I get a dialogue box stating Upload complete.
PHP:
ob_start();
require_once('UploadedFiles.php');
$galleryPath = 'Applications/MAMP/htdocs/www.site.dev/newuploads/';
$thumbnailsPath = $galleryPath.'thumbnails/';
while(($uploadFile = UploadedFiles::fetchNext()) != null){
$sourceFile = $uploadedFile->getSourceFile();
$thumbnail = $uploadedFile->getThumbnail(1);
$safeFileName = $sourceFile->getSafeFileName($galleryPath);
$sourceFile->save($galleryPath.'/'.$safeFileName);
$thumbnail->save($thumbnailsPath.'/'.$safeFileName);
}
exit();
Java console:
Uploading to
http://www.site.dev/do_uploadCookies:[PHPSESSID=1f735f0529fd8517440b1c92bdc60476]
Setting HTTP params: Host=www.site.dev
Starting upload
Status = [200]
Sep 3, 2009 2:33:35 AM org.apache.commons.httpclient.HttpMethodBase getResponseBody
WARNING: Going to buffer response body of large or unknown size. Using getResponseBodyAsStream instead is recommended.
Server response: * SHOWS HTML OF MY LOGIN PAGE/HOMEPAGE *
Upload complete. Result page: * SHOWS HTML OF MY LOGIN PAGE/HOMEPAGE *
Did I miss anything steps in setting up? I am basically getting logged out and no images are created.
Any help will be greatyl appreciated.
Thanks