🐛 修复动图上传后没有动画的bug
This commit is contained in:
@@ -160,13 +160,13 @@ class ImageService
|
||||
$builder->where('strategy_id', $id);
|
||||
})->where('md5', $image->md5)->where('sha1', $image->sha1)->first();
|
||||
if (is_null($existing)) {
|
||||
$handle = $img->stream();
|
||||
$handle = fopen($file, 'r');
|
||||
try {
|
||||
$filesystem->writeStream($pathname, $handle->detach());
|
||||
$filesystem->writeStream($pathname, $handle);
|
||||
} catch (FilesystemException $e) {
|
||||
throw new UploadException('图片上传失败');
|
||||
}
|
||||
$handle->close();
|
||||
@fclose($handle);
|
||||
} else {
|
||||
$image->fill($existing->only('path', 'name'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user