Can anyone tell me how to use Uploadify to upload directly to Amazon S3?
My code is as follows:
$(\'#fileInput\').uploadify({
\'fileDataName\' : \'
this is the java code for saving image into s3cloud. add this code into your uploadscript file (like uploadify.php) you will have your own uploadify script file.
AWSCredentials credentials = new AWSCredentials(_ACCESS_KEY, _SECRET_KEY);
log.info("oovfilepath : " + oovfilepath);
log.info("name : " + name);
S3Service s3Service = new RestS3Service(credentials);
S3Bucket s3Bucket = s3Service.createBucket(_BUCKET_NAME);
AccessControlList bucketAcl = s3Service.getBucketAcl(s3Bucket);
bucketAcl.grantPermission(GroupGrantee.ALL_USERS,
Permission.PERMISSION_READ);
InputStream input = new FileInputStream(oovfilepath);
S3Object s3Object = new S3Object(s3Bucket, name);
log.info("s3Object:" + s3Object);
s3Object.setAcl(bucketAcl);
s3Object.setDataInputStream(input);
log.info("s3Object:" + s3Object);
s3Service.putObject(s3Bucket, s3Object);