psugand / codeigniter-s3 Goto Github PK
View Code? Open in Web Editor NEWAmazon S3 Library for CodeIgniter
Home Page: http://prashant.es
Amazon S3 Library for CodeIgniter
Home Page: http://prashant.es
libraries/S3.php: 1535
$value{0} to $value[0]
How to implement this.
Actually in Amazon documentation it is mentioned.
How can we set REDUCED_REDUNDANCY on the file uploads?
Can't get it to work with your code...
Hello,
how can we check if bucket exist or not ?
Is there any way to make this library working with the AWS Signature Version 4?
http://docs.aws.amazon.com/AmazonS3/latest/API/sig-v4-authenticating-requests.html
Now I'm getting the error: The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256
Hi,
Thanks for providing this library.
I know this is not the place to ask, but I am hoping you can help with a questions I posted here: http://stackoverflow.com/questions/34795153/get-first-image-from-amazon-s3-folder.
Hi,
I am recieving an error when I try to delete an object and I have the correct permissions, I think.
Here is the exact message: Message: S3::deleteObject(): [AccessDenied] Access Denied
Any idea why I am getting this message?
This runs perfect for me locally, but on my server it's dying inside of the $rest->getResponse() function between
public function getResponse(){
echo 'in getResponse'.br(1);
var_dump($this);
$query = '';
if (sizeof($this->parameters) > 0){
$query = substr($this->uri, -1) !== '?' ? '?' : '&';
foreach ($this->parameters as $var => $value)
if ($value == null || $value == '')
$query .= $var . '&';
// Parameters should be encoded (thanks Sean O'Dea)
else
$query .= $var . '=' . rawurlencode($value) . '&';
$query = substr($query, 0, -1);
$this->uri .= $query;
if (array_key_exists('acl', $this->parameters) ||
array_key_exists('location', $this->parameters) ||
array_key_exists('torrent', $this->parameters) ||
array_key_exists('logging', $this->parameters))
$this->resource .= $query;
}
$url = ((S3::$use_ssl && extension_loaded('openssl')) ?
'https://' : 'http://') . $this->headers['Host'] . $this->uri;
// var_dump($this->bucket, $this->uri, $this->resource, $url);
// Basic setup
$curl = curl_init();
curl_setopt($curl, CURLOPT_USERAGENT, 'S3/php');
echo '1'.br(1);
....
....
}
Why would it work locally but die here on the server?
Hi,
I am trying to call $this->s3->listBuckets()
but I keep geeting this error:
A PHP Error was encountered
Severity: Error
Message: Call to undefined function curl_init()
Filename: libraries/S3.php
Line Number: 1365
Can you help me with this?
Get contents for a bucket returning wrong object size for large objects (tried it with 8.2GB object but returned size as 2GB). Temporary fix was to type cast size as a float in the getBucket function
Hello Prashant,
We just copied your files and paste into our CI project with AWS keys and bucket name but its not working.
System library, S3 Library and make config in config.php
Can you please help me!
Thanks
I am getting an error while trying uploading files to s3 server
Hello
This is not an Issue, I'm using your library its working fine. One thing, I need session token which we need to pass to iOS developer using that they will upload files directly to S3 using AWS iOS SDK. Can you please tell me how can i generate session token using your library.
I use west europe bucket
when i try to put file on my bucket, i get following error
Message: S3::putObject(): [InvalidRequest] The authorization mechanism you have provided is not supported. Please use AWS4-HMAC-SHA256.
Any solution?
Hi team! I need help when I try to upload files from a post.
I have this code inside a "for" bucle:
for ($i = 0; $i < count($_FILES['pictures']['name']); $i++){
$path_parts = pathinfo($_FILES['pictures']['name'][$i]);
$image_path = $path_parts['filename'].$path_parts['extension'];
$uri = $image_path;
$file = $_FILES['pictures']['tmp_name'][$i];
$input = S3::inputFile($file);
if (S3::putObject($input, $bucket, $uri, S3::ACL_PUBLIC_READ)) {
echo "File uploaded.";
} else {
echo "Failed to upload file." . $uri . $bucket . $input;
}
}
But not works. I have configured my keys but I think that the problems comes maybe to not set region of the bucle?
Please any help is appreciated. Thank you!
Hi i'm using this wonderfull library and i'm really happy with it.
I just think i got a problem with the deleteObject() method.
I have a bucket called "webapp".
Then all my links looks like "www.s3.amazon.com/webapp/123/photos/file.jpg" so i run $this->s3->deleteObject("webapp","www.s3.amazon.com/webapp/123"); and it returns TRUE without any errors.
But if i browse the link by browser the files still be in there, so the object is not deleted.
Have you any clue please?
Thanks a lot!
I was trying to specify ap-southeast-1 and it kept failing.
It was caused by the strtoupper in line 250
$input = $this->s3->inputFile($pathToFile);
$this->s3->putObject($input, S3BUCKET, "data/form.json" , S3::ACL_PUBLIC_READ,array("x-amz-server-side-encryption"=>"AES256"));
Doing this to encrypt data on Amazon S3 bucket, I receive:
Message: S3::putObject(): [SignatureDoesNotMatch] The request signature we calculated does not match the signature you provided. Check your key and signing method.
When i change my code to:
$this->s3->putObject($input, S3BUCKET, "data/form.json" , S3::ACL_PUBLIC_READ);
Everything is back to normal. Any idea?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.