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

Notification

Icon
Error

Options
Go to last post Go to first unread
LBX  
#1 Posted : Wednesday, September 2, 2009 11:43:02 AM(UTC)
LBX

Rank: Newbie

Groups:
Joined: 9/1/2009(UTC)
Posts: 1

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/myaccount
Thu 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/myaccount
Reading 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/myaccount

Viewing 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_upload
Cookies:[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
Tamila  
#2 Posted : Wednesday, September 2, 2009 3:32:08 PM(UTC)
Tamila

Rank: Advanced Member

Groups:
Joined: 3/9/2008(UTC)
Posts: 554

Was thanked: 1 time(s) in 1 post(s)
Hello,

Please see my answer in case.
Aurigma Support Team

UserPostedImage Follow Aurigma on Twitter!
ECX  
#3 Posted : Wednesday, September 23, 2009 2:46:07 AM(UTC)
ECX

Rank: Newbie

Groups: Member
Joined: 9/23/2009(UTC)
Posts: 1

edit:

I had the same problem in IE and FF, only chrome did not loose its session.
I am working with CakePHP, and solved this by setting Session.checkAgent to false in the core config.

When set to true this will reset the session if it receives a request with the same sessionID from another user agent. Since Aurigma sends requests with its own 'user agent' value this is the case.
Setting the config to false will keep your session.

Please note that this makes your app a little more prone to cross site posts or session highjacking, i'm just stating this as a temp fix, you should create a workaround for this on a live site.

Edited by user Wednesday, September 23, 2009 3:54:42 AM(UTC)  | Reason: Not specified

Tamila  
#4 Posted : Wednesday, September 23, 2009 5:02:03 AM(UTC)
Tamila

Rank: Advanced Member

Groups:
Joined: 3/9/2008(UTC)
Posts: 554

Was thanked: 1 time(s) in 1 post(s)
Hello,

Actually, the latest version Image Uploader 6.1.4 supports User-Agent change functionality. You can download Image Uploader 6.1.4 here:
http://aurigma.com/Produ...eUploader/FreeTrial.aspx
Aurigma Support Team

UserPostedImage Follow Aurigma on Twitter!
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.