From f68ac5039a2874797b4e118382c2a30e5bb11c32 Mon Sep 17 00:00:00 2001 From: vine_liutk <961510893@qq.com> Date: Fri, 21 Jan 2022 18:03:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E5=AF=BC=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Admin/Imports/Import.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Admin/Imports/Import.php b/app/Admin/Imports/Import.php index c2d13eae..eaf81714 100644 --- a/app/Admin/Imports/Import.php +++ b/app/Admin/Imports/Import.php @@ -15,7 +15,8 @@ class Import $file_name = substr($url, strrpos($url, '/')+1); $path = DIRECTORY_SEPARATOR.'import'.DIRECTORY_SEPARATOR.date('Y-m-d').DIRECTORY_SEPARATOR.'import'.$file_name; - Storage::put($path, file_get_contents($url)); + // dd(str_replace(config('filesystems.disks.aliyun.domain'), config('filesystems.disks.aliyun.bucket').'.'.config('filesystems.disks.aliyun.endpoint'), $url)); + Storage::put($path, file_get_contents(str_replace(config('filesystems.disks.aliyun.domain'), config('filesystems.disks.aliyun.bucket').'.'.config('filesystems.disks.aliyun.endpoint'), $url))); $file = new File(storage_path('app'.$path)); return $this->readFile($file); }