Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
quoc1506 opened this issue Jun 19, 2017 · 1 comment

Comments

@quoc1506
Copy link

quoc1506 commented Jun 19, 2017

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

@jmathai
Copy link
Owner

jmathai commented Jun 21, 2017

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants