【发布时间】:2017-07-29 13:43:19
【问题描述】:
我正在尝试 (PHP) 使用 S3 流包装器 (s3://...) 将文件从 Amazon S3 卷曲到 Vimeo 并收到以下错误:
curl_setopt_array(): 不能将 tcp_socket/ssl 类型的流表示为 [...] 中的 STDIO 文件
有没有办法 cURL PUT 一个远程文件?这是正在发送的 curl 选项:
$curl_opts = array(
CURLOPT_PUT => true,
CURLOPT_INFILE => $file, // this refers to 's3://path-to-object'
CURLOPT_INFILESIZE => $size,
CURLOPT_UPLOAD => true,
CURLOPT_HTTPHEADER => array('Expect: ', 'Content-Range: replaced...')
);
【问题讨论】:
标签: php curl amazon-s3 vimeo-api php-stream-wrappers