s3-bucket-stream-zip-php icon indicating copy to clipboard operation
s3-bucket-stream-zip-php copied to clipboard

curl_setopt(): supplied argument is not a valid File-Handle resource ^2.0

Open quoc1506 opened this issue 7 years ago • 1 comments

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

quoc1506 avatar Jun 19 '17 02:06 quoc1506

Can you paste the entire file with line numbers and the exact error message?

jmathai avatar Jun 21 '17 21:06 jmathai