Browse Source

fixed:后台-规定上传接口返回url格式

刘学玺 3 months ago
parent
commit
f31d7bf799
1 changed files with 2 additions and 1 deletions
  1. 2 1
      app/Providers/FileSystemServiceProvider.php

+ 2 - 1
app/Providers/FileSystemServiceProvider.php

@@ -33,7 +33,8 @@ class FileSystemServiceProvider extends ServiceProvider
 
                 public function url($path)
                 {
-                    return "/api/download?filename={$path}&bucket={$this->config['bucket']}";
+                    $filename = basename($path);
+                    return "/api/download?filename={$filename}&bucket={$this->config['bucket']}";
                 }
             };
         });