Mike 8 년 전
부모
커밋
376131a32f
2개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 1 1
      server/app/Helper/AttachmentHelper.php
  2. 1 1
      server/app/Http/Controllers/Api/V1/AttachmentController.php

+ 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: