dever 3 years ago
parent
commit
61a3621c6c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lib/File.php

+ 2 - 2
lib/File.php

@@ -16,11 +16,11 @@ class File
             $file = str_replace('{uploadYun}', '', $source);
         } elseif (strstr($source, 'http')) {
             $host = parse_url($source);
-            $file = $host['path'];
+            $file = ltrim($host['path'], '/');
         }
 
         $temp = explode('/', $file);
-        $key = $temp[1];
+        $key = $temp[0];
         $config = Dever::load('upload/lib/config')->get($key);
         if ($config) {
             if ($config['save_type'] >= 2 && $config['yun']) {