fix: 上传文件路径转换

This commit is contained in:
JaguarJack 2023-05-10 16:53:22 +08:00
parent 948082f4ce
commit ac5e0957b9

View File

@ -26,11 +26,9 @@ class LocalUpload extends Upload
*/ */
protected function addUrl($path): mixed protected function addUrl($path): mixed
{ {
if (Str::of($path['path'])->contains('\\')) { $path['path'] = config('app.url') . '/'.
$path['path'] = Str::of($path['path'])->replace('\\', '/');
}
$path['path'] = config('app.url') . '/'. $path['path']; Str::of($path['path'])->replace('\\', '/')->toString();
return $path; return $path;
} }