gpt4 book ai didi

php - 亚马逊 s3 存储桶上传图像 curl 异常 'data rewind wasn' t 可能 '

转载 作者:搜寻专家 更新时间:2023-10-31 22:05:18 29 4
gpt4 key购买 nike

我正在使用 codeigniter 将图像上传到亚马逊存储桶。我遇到了这个错误,我不知道如何解决这个问题

Fatal error: Uncaught exception 'Guzzle\Http\Exception\CurlException' with message '[curl] 65: necessary data rewind wasn't possible [url] https://public-ww-lk.s3.amazonaws.com/images/gallery/the-kingsbury-colombo-sri-lanka-21401-293x154.jpg' in E:\projects\wwlk\application\third_party\Awsmy\vendor\guzzle\guzzle\src\Guzzle\Http\Curl\CurlMulti.php:338 Stack trace: #0 E:\projects\wwlk\application\third_party\Awsmy\vendor\guzzle\guzzle\src\Guzzle\Http\Curl\CurlMulti.php(279): Guzzle\Http\Curl\CurlMulti->isCurlException(Object(Guzzle\Http\Message\EntityEnclosingRequest), Object(Guzzle\Http\Curl\CurlHandle), Array) #1 E:\projects\wwlk\application\third_party\Awsmy\vendor\guzzle\guzzle\src\Guzzle\Http\Curl\CurlMulti.php(244): Guzzle\Http\Curl\CurlMulti->processResponse(Object(Guzzle\Http\Message\EntityEnclosingRequest), Object(Guzzle\Http\Curl\CurlHandle), Array) #2 E:\projects\wwlk\application\third_party\Awsmy\vendor\guzzle\guzzle\src\Guzzle\Http\Curl\CurlMulti.php(227): Guzzle\Http\Curl\CurlMulti->processMessages() #3 E:\pro in E:\projects\wwlk\application\third_party\Awsmy\vendor\aws\aws-sdk-php\src\Aws\Common\Client\AbstractClient.php on line 285

最佳答案

尝试将 CURL 选项 body_as_string 设置为 true

像这样:

<?php

$client->getConfig()->set('curl.options', array('body_as_string' => true));

关于php - 亚马逊 s3 存储桶上传图像 curl 异常 'data rewind wasn' t 可能 ',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19774086/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com