Skip to content

Problem when Upload file any connection is established #28

@Keopss

Description

@Keopss

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions