0

I want to upload a large file from My computer to S3 Server without editing php.ini. Firstly,I choose file from browse button and submit upload button and then upload to s3 server. But I can't post form file data when I upload a large file. But I don't want to edit php.ini.Is there any way to upload a large local file to s3 server?

Thomas Dickey
  • 51,086
  • 7
  • 70
  • 105
Kelvin
  • 11
  • 2
  • might be handy: http://stackoverflow.com/questions/2447837/upload-1gb-files-using-chunking-in-php – castis May 22 '15 at 03:27
  • your computer? there are clients that and do this without needing php\webserver et al –  May 22 '15 at 03:30
  • I mean files from Client 's computer to s3 server . When form post , there are limit upload_max_filesize and post_max_size in php.ini. That's why I can't post form data. But our company don't want to edit server setting. – Kelvin May 22 '15 at 03:42
  • if you can't change the limits, then you can't. Move hosts –  May 22 '15 at 03:44

2 Answers2

-1

I've done this by implementing Fine Uploader's php implementation for S3. As of recently it is through an MIT license. It's an easy way to upload huge files to S3 without changing your php.ini at all.

It's not the worst thing in the world to set up. You'll need to set some environment variables for the public/secret keys, set up CORS settings on the bucket, and write a php page based on one of the examples which will call a php endpoint that'll handle the signing.

One thing that was not made obvious to me was that, when setting the environment variables, they expect you to make two separate AWS users with different privileges for security reasons.

RaisinBranCrunch
  • 567
  • 12
  • 20
  • Why the downvote? What I said was not inaccurate, and implementing or writing a file chunking tool is the only way to accomplish this. – RaisinBranCrunch Jul 20 '16 at 19:37
-2
ini_set("upload_max_filesize","300M");

try this