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

Notification

Icon
Error

2 Pages12>
Options
Go to last post Go to first unread
mcousins  
#1 Posted : Tuesday, July 7, 2009 4:54:44 AM(UTC)
mcousins

Rank: Member

Groups: Member
Joined: 6/8/2009(UTC)
Posts: 25

I'm implementing an Amazon S3 setup using Image Uploader 6 Express. I was given some sample code by Dmitry which I have modified for my use.

I have a line in my code with my license keys:
$iu->setLicenseKey('71068-10000-5020F-12F65-5F4DF;72068-10000-5E112-F9C5E-07819;72068-10000-5463E-6FEC1-4E284;71068-10000-0CF77-BCB77-D289D');

When I attempt to send files I get the "No valid license key for current DNS/IP..." error. I have read the quick tips to solve this, but my license keys all appear valid and entered correctly.

Any ideas what is wrong?

Edited by user Friday, October 9, 2009 1:21:21 PM(UTC)  | Reason: Not specified

mcousins  
#2 Posted : Tuesday, July 7, 2009 7:58:59 AM(UTC)
mcousins

Rank: Member

Groups: Member
Joined: 6/8/2009(UTC)
Posts: 25

Dmitry  
#3 Posted : Tuesday, July 7, 2009 5:12:02 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

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

As far as I understand you are using Bucket name as Virtual Host Amazon S3 feature. In this case you need to specify CNAME domain name in both Bucket and BucketHostName properties.
Code:

$as3 = new AmazonS3Extender(writer);
...
$as3->setBucket('s3.canadianexposures.com');
$as3->setBucketHostName('s3.canadianexposures.com');
...

Keep in mind that according to Amazon documentation specified before you need to create s3.canadianexposures.com bucket on the service.

Edited by user Wednesday, July 8, 2009 2:00:26 AM(UTC)  | Reason: Not specified

Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
mcousins  
#4 Posted : Wednesday, July 8, 2009 12:44:13 AM(UTC)
mcousins

Rank: Member

Groups: Member
Joined: 6/8/2009(UTC)
Posts: 25

Thank you, that fixed that problem! I had already created the s3.canadianexposures.com bucket. Here is a test showing that my bucket is functioning properly:
UserPostedImage

Now I am getting the progress dialog to come up and it looks like it transfers the file to Amazon. Once it has finished I get an error message which seems to vary each time. It is usually something to do with the signature being incorrect??

Edited by user Wednesday, July 8, 2009 12:56:19 AM(UTC)  | Reason: Not specified

Dmitry  
#5 Posted : Wednesday, July 8, 2009 1:37:52 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

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

Quote:
Once it has finished I get an error message which seems to vary each time. It is usually something to do with the signature being incorrect??


Could you describe it in detail? It would be great if you attach content of Java console after the problem arises and make some screenshots.
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
mcousins  
#6 Posted : Thursday, July 9, 2009 1:30:32 AM(UTC)
mcousins

Rank: Member

Groups: Member
Joined: 6/8/2009(UTC)
Posts: 25

It actually does upload but sometimes it gives errors. This is one of the errors:

[Image was removed]

[Image was removed]

It comes up after the image is uploaded. The progress bar hits 100%, then this message comes up. Sometimes I get an error message complaining about a signature. Sometimes it works without any errors though as well. Also, sometimes I get weird behaviour where images that I have uploaded previously get uploaded again even though they aren't currently selected. I'm guessing it has something to do with the multiple thumbnail upload hacks for Amazon S3.

Also, as you can see I'm using my S3 bucket to host these error messages and I used my uploader to upload them. It does work, it just throws errors half the time or so.

Feel free to upload some images and test it out yourself.

Edited by user Friday, December 18, 2009 8:17:27 PM(UTC)  | Reason: Not specified

mcousins  
#7 Posted : Thursday, July 9, 2009 1:37:24 AM(UTC)
mcousins

Rank: Member

Groups: Member
Joined: 6/8/2009(UTC)
Posts: 25

Here is the signature error:

[Image was removed]

Edited by user Friday, December 18, 2009 8:17:45 PM(UTC)  | Reason: Not specified

mcousins  
#8 Posted : Thursday, July 9, 2009 4:55:43 AM(UTC)
mcousins

Rank: Member

Groups: Member
Joined: 6/8/2009(UTC)
Posts: 25

Here's another one I just got. Pretty much everytime I run it I get a different error!

[Image was removed]

Edited by user Friday, December 18, 2009 8:18:00 PM(UTC)  | Reason: Not specified

mcousins  
#9 Posted : Thursday, July 9, 2009 8:25:49 AM(UTC)
mcousins

Rank: Member

Groups: Member
Joined: 6/8/2009(UTC)
Posts: 25

I think I got it working successfully now. I think it was a botched/partial 6.0.16.0 install issue.
Dmitry  
#10 Posted : Thursday, July 9, 2009 3:18:10 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

Thanks: 1 times
Was thanked: 12 time(s) in 12 post(s)
Okay, great. Feel free to contact us if you have some problems.
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
mcousins  
#11 Posted : Sunday, July 19, 2009 12:49:42 PM(UTC)
mcousins

Rank: Member

Groups: Member
Joined: 6/8/2009(UTC)
Posts: 25

1. When the files are uploaded I need to add corresponding database entries. Is this possible with the sample code that you gave me? If I specify a redirect URL it cancels the upload after the first thumbnail is loaded and takes me to the redirected page before the complete upload is finished.

If I specify an action instead of a redirect it never seems to get fired. I made a php file which simply adds a record to a database and specified this as my action but no rows are ever added to the database.

2. When the page is loaded I get the security warning, choose install and then the app begins installing. I get an error saying there is a copying error copying the .ocx file. If I choose to continue with the setup, everything works okay, but the image uploader is not installed properly (viewing the object in my temp files shows no 6.0.16.0 image uploader and the uploader is installed everytime you return).

3. There is a period inserted before the image uploader. Any ideas why this being put there?

4. In Firefox the Image Uploader just says loading, but never loads. This is what the Java console shows after 3 attempts:
Quote:
Aurigma ImageUploader version: 6.0.16.0
Current document URL: http://www.canadianexposures.com/upload
19-Jul-2009 10:15:02 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
Aurigma ImageUploader version: 6.0.16.0
Current document URL: http://www.canadianexposures.com/upload
Aurigma ImageUploader version: 6.0.16.0
Current document URL: http://www.canadianexposures.com/upload


Edited by user Sunday, July 19, 2009 3:25:00 PM(UTC)  | Reason: Not specified

mcousins  
#12 Posted : Sunday, July 19, 2009 1:41:44 PM(UTC)
mcousins

Rank: Member

Groups: Member
Joined: 6/8/2009(UTC)
Posts: 25

Update on Firefox, it loads but it takes several minutes (about 5 minutes) to do so. This happens every time the page is loaded. No error messages are displayed in the Java console.
mcousins  
#13 Posted : Sunday, July 19, 2009 1:50:20 PM(UTC)
mcousins

Rank: Member

Groups: Member
Joined: 6/8/2009(UTC)
Posts: 25

5. How do you change the thumbnail names? I do not want them named *_Thumbnail1.jpg and *_Thumbnail2.jpg.
mcousins  
#14 Posted : Monday, July 20, 2009 1:14:05 AM(UTC)
mcousins

Rank: Member

Groups: Member
Joined: 6/8/2009(UTC)
Posts: 25

Update on #2: It seems to be only in my one browser at home that I get this error. I guess I have to clean out my temporary internet files or something to properly upgrade the browser? It has an older version in the object list when I view it. It works fine on my work PC and my laptop, my home PC is the only one with issues and that is the only one that had the old version installed on it.

Also, here is some more details about the entire process I want to accomplish if that will help:

- The user will select a website folder in their gallery to upload the photos to with a drop-down.
- The user chooses the photos to upload.
- The user clicks "Upload Photos"
- 3 photos need to be uploaded. The original goes to /<userid>/original/<filename>_<timestamp>.jpg, the large (600x600) goes to /<userid>/large/<filename>_<timestamp>.jpg, the thumbnail (100x100) goes to /<userid>/thumb/<filename>_<timestamp>.jpg.
- Each photo uploaded needs to have a database entry added for it which includes a display name (original filename), the actual filename (filename + timestamp, to keep the files unique on the server) and the folder id that they chose before

Right now I have it uploading into those directories, but I can't rename the files as I want to. I also can't figure out how to add an action which will add the database entries. None of the documentation seems applicable to an Amazon S3 workflow.

Edited by user Monday, July 20, 2009 1:14:40 AM(UTC)  | Reason: Not specified

mcousins  
#15 Posted : Monday, July 20, 2009 11:45:36 AM(UTC)
mcousins

Rank: Member

Groups: Member
Joined: 6/8/2009(UTC)
Posts: 25

Anybody?
Dmitry  
#16 Posted : Monday, July 20, 2009 3:51:22 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

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

Sorry for delayed respond. Here are my answers:

Quote:
When the files are uploaded I need to add corresponding database entries.

It is quite simple, you need to post names of these files and the other required information to your server after Image Uploader completes upload. As a solution you can use a form where you add all required information and submit it in AfterUpload event handler (see the attached example).

Quote:
How do you change the thumbnail names? I do not want them named *_Thumbnail1.jpg and *_Thumbnail2.jpg.

By default Image Uploader sends the listed names, nevertheless there is a trick allowing to modify these names, you need to rewrite "key" field in the POST request with a new value before Image Uploader sends it (see the attached example).

Quote:
When the page is loaded I get the security warning, choose install and then the app begins installing. I get an error saying there is a copying error copying the .ocx file.

Try to unregister Image Uploader before to open a page with Image Uploader next time.

Quote:
There is a period inserted before the image uploader. Any ideas why this being put there?

Sorry, did not understand what you mean. Could you explain it a bit detailed?

Quote:
In Firefox the Image Uploader just says loading, but never loads.

Very strange. Do you have this behavior on some particular machine? What operation system, JRE version and version of FireFox do you use? Also, please, give me content of Java Console with 5 trace level.


Edited by user Tuesday, July 21, 2009 1:12:56 AM(UTC)  | Reason: Not specified

File Attachment(s):
as3.zip (2,120kb) downloaded 20 time(s).
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
mcousins  
#17 Posted : Tuesday, July 21, 2009 1:03:30 AM(UTC)
mcousins

Rank: Member

Groups: Member
Joined: 6/8/2009(UTC)
Posts: 25

1. I don't think a post is going to work. The client will be uploading 5-20GB at a time so this will be running for possibly days. We need an action being run after every image is uploaded.

2. The renaming seems to be working great now. Thanks.

3. I will try unregistering this when I get home.

4. The period issue is now resolved.

5. I just tried in Firefox here at work and it was much faster. I will investigate this a bit more on my end.
mcousins  
#18 Posted : Wednesday, July 22, 2009 7:25:34 AM(UTC)
mcousins

Rank: Member

Groups: Member
Joined: 6/8/2009(UTC)
Posts: 25

Any idea how to accomplish this?
Dmitry  
#19 Posted : Wednesday, July 22, 2009 3:07:42 PM(UTC)
Dmitry

Rank: Advanced Member

Groups: Member, Administration, Moderator
Joined: 8/3/2003(UTC)
Posts: 1,070

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

Quote:
I don't think a post is going to work. The client will be uploading 5-20GB at a time so this will be running for possibly days. We need an action being run after every image is uploaded.

The required functionality can be achieved with Image Uploader, you need to initiallize XmlHttpRequest after package upload completes. I attached the modified sample to this thread.
File Attachment(s):
as3.zip (2,121kb) downloaded 16 time(s).
Sincerely yours,
Dmitry Sevostyanov

UserPostedImage Follow Aurigma on Twitter!
mcousins  
#20 Posted : Thursday, July 23, 2009 2:25:06 PM(UTC)
mcousins

Rank: Member

Groups: Member
Joined: 6/8/2009(UTC)
Posts: 25

We are getting close now. That last code now allows me to add a database entry after each photo is uploaded. The only problem now is that it also broke the uploading of the 2 thumbnails. Now only the source file is uploaded. Any ideas why it broke the multiple thumbnail uploading?
Users browsing this topic
2 Pages12>
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.