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

Notification

Icon
Error

Options
Go to last post Go to first unread
seeyousurf  
#1 Posted : Tuesday, October 6, 2009 8:52:45 PM(UTC)
seeyousurf

Rank: Member

Groups: Member
Joined: 5/19/2009(UTC)
Posts: 20

<script language="javascript" src="iuembed.js"> </script>
<script type="text/javascript" src="iuembed.AmazonS3.js"> </script>
<script language="javascript">
var iu = new ImageUploaderWriter("ImageUploader", 650, 450);

// If you do not want to use ActiveX or Java version, set the appropriate
// property to false.
iu.activeXControlEnabled = true;
iu.javaAppletEnabled = true;

iu.activeXControlCodeBase = "ImageUploader6.cab";
iu.javaAppletCodeBase="./";
iu.addParam("LicenseKey", "xxxxx-xxxxx-xxxxx-xxxxx-xxxxx;xxxxx-xxxxx-xxxxx-xxxxx-xxxxx");

var as3 = new AmazonS3Extender(iu);
as3.setAWSAccessKeyId("AccessKey");
as3.setBucket("Bucket");
as3.setBucketHostName("https://s3.amazonaws.com/");
// ... initialize params as described in the next topic ...
as3.gestSourceFile().SetPolicy(???);
as3.gestSourceFile().SetKey("folder/");
as3.gestSourceFile().SetAcl("public-read-write");
as3.gestSourceFile().SetSignature("Secretkey");
// As soon as you call this method, all necessary HTML code is inserted
// into the page on the current position. Alternatively, you can
// get the string with appropriate HTML code using the getHtml method,
// and write it to the necessary position manually (maybe with some modifications).
iu.writeHtml();
</script>


Is it correct this code?
Post the correct code please.
Thanks
Tamila  
#2 Posted : Wednesday, October 7, 2009 3:25:25 PM(UTC)
Tamila

Rank: Advanced Member

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

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

About your code. You can use client-side code (javascript) but to get Policy value you need to use server-side code. How to do it you can read here:
Uploading to Cloud Storages
Also you should remove this line:
as3.setBucketHostName("https://s3.amazonaws.com/");

and correct these ones:
as3.getSourceFile().SetPolicy(???);
as3.getSourceFile().SetKey("folder/");
as3.getSourceFile().SetAcl("public-read-write");
as3.getSourceFile().SetSignature("Secretkey");

Anyway, I recommend you to use PHP Library or ASP.NET Control to make this work easer. How to use it you can fine in sample which Alex sent you before:
http://forums.aurigma.co...blem-with-amazon-S3.aspx
Aurigma Support Team

UserPostedImage Follow Aurigma on Twitter!
Users browsing this topic
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.