wupengfei 2 years ago
parent
commit
87a8670a94
2 changed files with 2 additions and 3 deletions
  1. 1 2
      .idea/workspace.xml
  2. 1 1
      application/api/controller/Upload.php

+ 1 - 2
.idea/workspace.xml

@@ -3,7 +3,6 @@
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/api/controller/Supplier.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Supplier.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/application/api/controller/Upload.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Upload.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
@@ -296,7 +295,7 @@
       <workItem from="1681779545042" duration="19230000" />
       <workItem from="1681866032563" duration="20122000" />
       <workItem from="1681952639054" duration="20563000" />
-      <workItem from="1682038348727" duration="784000" />
+      <workItem from="1682038348727" duration="860000" />
     </task>
     <servers />
   </component>

+ 1 - 1
application/api/controller/Upload.php

@@ -63,7 +63,7 @@ class Upload extends Base
         $this->uptype = $this->getUploadType();
         $this->extend = pathinfo($file->getInfo('name'), PATHINFO_EXTENSION);
         $name = File::name($file->getPathname(), $this->extend, '', 'md5_file');
-        $info = File::instance($this->uptype)->save(date('Y-m-d H:i:s').'/'.$name, file_get_contents($file->getRealPath()), $this->safe);
+        $info = File::instance($this->uptype)->save(date('Y-m-d').'/'.$name, file_get_contents($file->getRealPath()), $this->safe);
         if (is_array($info) && isset($info['url'])) {
             $url = $this->safe ? $name : $info['url'];
             $this->success('上传成功',$url);