Mike il y a 8 ans
Parent
commit
376131a32f

+ 1 - 1
server/app/Helper/AttachmentHelper.php

xqd
@@ -75,7 +75,7 @@ trait AttachmentHelper
                     $attachment->size = $fileSize;
                     $attachment->file_type = $fileMimeType;
                     if ($attachment->save()) {
-                        $result[$idx] = route('attachment.download', $md5);
+                        $result[$idx] = $md5;
                     } else {
                         @unlink($real_path);
                         $result[$idx] = ErrorCode::ATTACHMENT_SAVE_FAILED;

+ 1 - 1
server/app/Http/Controllers/Api/V1/AttachmentController.php

xqd
@@ -56,7 +56,7 @@ class AttachmentController extends Controller
      *     "code": 0,
      *     "message": "",
      *     "data": [
-     *         "file": "http://localhost/web/attachment/f72e7dad80f597ed6621a009e82243ad",
+     *         "file": "f72e7dad80f597ed6621a009e82243ad", //文件访问url http://localhost/web/attachment/f72e7dad80f597ed6621a009e82243ad
      *     ]
      * }
      * @apiErrorExample {json} Error-Response: