We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
如题,代码如下
public function clientUploadCallback(): JsonResponse { $aliyun = Storage::disk('aliyun')->getAdapter(); [$verify, $data] = $aliyun->verify(); // php 7.1 + Log::debug('verify', [$verify]); Log::debug('data', [$data]); if ($verify) { // 验证失败处理,此时 $data 为验签失败提示信息 } // 注意一定要返回 json 格式的字符串,因为 oss 服务器只接收 json 格式,否则给前端报 CallbackFailed return response()->json($data); }
验签是报错 Call to undefined method Iidestiny\Flysystem\Oss\OssAdapter::verify(), verify方法不存在 不知道哪里出问题了
Laravel : 8.83.17 PHP: 8.0 iidestiny/laravel-filesystem-oss: 2.1
The text was updated successfully, but these errors were encountered:
多半是你这个Storage::disk('aliyun')->getAdapter() 中的disk 阿里云配置不对,或者不存在这个disk
先检查一下你的config/filesystems.php,下面是否配置正确,给你一个我的示例,注意这里:'driver' => 'oss'
'aliyun' => [ 'driver' => 'oss', 'root' => '', 'access_key' => env('OSS_ACCESS_KEY'), 'secret_key' => env('OSS_SECRET_KEY'), 'endpoint' => env('OSS_ENDPOINT'), 'bucket' => env('OSS_BUCKET'), 'isCName' => env('OSS_IS_CNAME', false), ],
Sorry, something went wrong.
No branches or pull requests
如题,代码如下
验签是报错 Call to undefined method Iidestiny\Flysystem\Oss\OssAdapter::verify(), verify方法不存在
不知道哪里出问题了
Laravel : 8.83.17
PHP: 8.0
iidestiny/laravel-filesystem-oss: 2.1
The text was updated successfully, but these errors were encountered: