Open Keopss opened 6 years ago
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 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'];
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!