Closed chaiyanlin closed 2 months ago
感谢反馈,已更新,麻烦更新 overtrue/flysystem-cos 至 5.1.11
composer update overtrue/flysystem-cos
感谢反馈,已更新,麻烦更新 overtrue/flysystem-cos 至 5.1.11
composer update overtrue/flysystem-cos
下面的代码似乎有问题,$expiresAt
并没有初始化,所以当执行$expiresAt instanceof \DateTimeInterface
会报错,似乎应该把$expiresAt
替换成$expiration
?
public function getTemporaryUrl(string $path, $expiration)
{
if ($expiresAt instanceof \DateTimeInterface) {
$expiration = $expiresAt->getTimestamp();
}
try {
return $this->getSignedUrl($path, $expiration);
} catch (\Throwable $exception) {
throw UnableToGenerateTemporaryUrl::dueToError($path, $exception);
}
}
Laravel Framework 10.48.22
在框架
FilesystemAdapter
中方法temporaryUrl
实际是调用adapter
的getTemporaryUrl
,具体代码如下:但现在
CosAdapter
中不存在getTemporaryUrl
,导致Storage::temporaryUrl
调用失败,提示"This driver does not support creating temporary URLs."