I am currently working with CI framework.
On my localhost I have created a folder in the CI folder called “uploads” it is basically next to “applications”, “systems” …
Also the S3 library is placed and it works well, I can create buckets, but when I want to upload a file from the uploads folder to a folder within the bucket that file does not get stored, rather a 1kb file with the name I provide gets placed instead.
Below is my code, as hard as I am trying it is just not going through; the location is also correct because using the same path I can easily unlink files.
[code=php]$this->s3->putObject(‘uploads/catimage.jpg’, ‘adp-asset’, ‘storage/23/catimage.jpg’, S3::ACL_PUBLIC_READ, $location = false);
It creates the folder 23 and also creates the file catimage.jpg; but the file is just a 1kb file, not the original.
Can anyone help me out and tell me what I am doing incorrectly?
Thanks.