CodeIgniter-S3
CodeIgniter-S3 copied to clipboard
Problem when Upload file any connection is established
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!