I want to upload an image file to my S3 storage using PHP. I use this helper library: https://github.com/psugand/CodeIgniter-S3
This is my PHP code:
$this->s3->putObject($this->s3->inputFile($tmp), 'dreamboks-assets-2017', '/test_example/' . basename($_FILES["userfile"]['tmp_name']), S3::ACL_PUBLIC_READ);
The problem is S3 always creating an empty directory first before my desire directory (test_example/).
How to avoid the unwanted empty directory? Is there any problem with my destination path parameter?