s3-bucket-stream-zip-php
s3-bucket-stream-zip-php copied to clipboard
curl_setopt(): supplied argument is not a valid File-Handle resource ^2.0
here is my code:
$params = [
"key" => "myKey",
"secret" => "mySecret",
"region" => "ap-southeast-1",
"bucket" => "myBuket",
"prefix" => "571/low/"
];
$stream = new S3BucketStreamZip($params);
$stream->send('name-of-zipfile-to-send.zip');
I'm sure all params is valid as I had upload successfully to my bucket, but I have no idea why I got this error, maybe something wrong for me related with this code (/jmathai/s3-bucket-stream-zip-php/src/S3BucketStreamZip.php):
$fp = tmpfile();
$ch = curl_init($signedUrl);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_FILE, $fp); // <----
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_exec($ch);
curl_close($ch);
Thanks, quoc
Can you paste the entire file with line numbers and the exact error message?