Closed githubkl closed 2 years ago
$auth = Storage::driver()->getAdapter();
$auth->uploadToken($bucket, null, $expires, $policy, true);
多谢
$auth = Storage::driver()->getAdapter(); $auth->uploadToken($bucket, null, $expires, $policy, true);
超哥,我自己试了下,Storage::driver()压根不存在这个方法,只有一个drive,但是drive方法下,也没有getAdapter()方法? 我就想知道下,我如果调用的是Storage::disk(‘qiniu’),能不能配置fsizeLimit?
我穿了一个34m的文件,调试了一下,发现一直报一个错
Error {#237
-url: "http://up.qiniup.com"
-response: Response {#236
+statusCode: 400
+headers: array:16 [
"Server" => "openresty/1.13.6.2"
"Date" => "Fri, 15 Mar 2019 10"
"Content-Type" => "application/json"
"Content-Length" => "66"
"Connection" => "keep-alive"
"Access-Control-Allow-Headers" => "X-File-Name, X-File-Type, X-File-Size"
"Access-Control-Allow-Methods" => "OPTIONS, HEAD, POST"
"Access-Control-Allow-Origin" => "*"
"Access-Control-Expose-Headers" => "X-Log, X-Reqid"
"Access-Control-Max-Age" => "2592000"
"Cache-Control" => "no-store, no-cache, must-revalidate"
"Pragma" => "no-cache"
"X-Content-Type-Options" => "nosniff"
"X-Log" => "body"
"X-Reqid" => "JTgAAL6CEiXtGowV"
"X-Svr" => "UP"
]
+body: "{"error":"invalid multipart format: multipart: message too large"}"
+error: "invalid multipart format: multipart: message too large"
-jsonData: array:1 [
"error" => "invalid multipart format: multipart: message too large"
]
+duration: 45.677
}
}
$adapter = Storage::disk('xx')->getDriver()->getAdapter();
官方SDK示例如下,$policy中添加fsizeLimit等策略项:
在本插件中如何使用呢?