0

I have uploading file to S3 from PHP.

I have changed upload file size limit in php.ini and also php file by set_timeout.

My problem is

I can upload a file within 6MB. But it take 4 mins to upload. But more than 50 MB file takes more than 10 mins

How can i solve this? Have any possible to modify my code. I am using s3.php file for that.

Mohaideen Ismail
  • 314
  • 4
  • 21

1 Answers1

0

You should use file direct upload

   <html>
      <head>
        ...
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        ...
      </head>
      <body>
      ...
      <form action="http://samar.s3.amazonaws.com/" method="post" enctype="multipart/form-data">
        Key to upload: <input type="input" name="key" value="user/eric/" /><br />
        <input type="hidden" name="acl" value="public-read" />
        <input type="hidden" name="success_action_redirect" value="http://johnsmith.s3.amazonaws.com/successful_upload.html" />
        Content-Type: <input type="input" name="Content-Type" value="image/jpeg" /><br />
        <input type="hidden" name="x-amz-meta-uuid" value="14365123651274" />
        Tags for File: <input type="input" name="x-amz-meta-tag" value="" /><br />
        <input type="hidden" name="AWSAccessKeyId" value="AKIAIOSFODNN7EXAMPLE" />
        <input type="hidden" name="Policy" value="POLICY" />
        <input type="hidden" name="Signature" value="SIGNATURE" />
        File: <input type="file" name="file" /> <br />
        <!-- The elements after this will be ignored -->
        <input type="submit" name="submit" value="Upload to Amazon S3" />
      </form>
      ...
    </html>

Diagram: http://docs.aws.amazon.com/AmazonS3/latest/dev/UsingHTTPPOST.html

Example code: http://docs.aws.amazon.com/AmazonS3/latest/dev/HTTPPOSTExamples.html

Samar Haider
  • 862
  • 10
  • 21