实现文件上传
This commit is contained in:
@@ -1902,6 +1902,27 @@ components:
|
||||
required:
|
||||
- id
|
||||
|
||||
ArticleUploadResponse:
|
||||
type: object
|
||||
properties:
|
||||
url:
|
||||
type: string
|
||||
path:
|
||||
type: string
|
||||
original_name:
|
||||
type: string
|
||||
size:
|
||||
type: integer
|
||||
format: int64
|
||||
mime_type:
|
||||
type: string
|
||||
required:
|
||||
- url
|
||||
- path
|
||||
- original_name
|
||||
- size
|
||||
- mime_type
|
||||
|
||||
PageArticleGroupRequest:
|
||||
allOf:
|
||||
- $ref: "#/components/schemas/PageRequest"
|
||||
@@ -5776,6 +5797,34 @@ paths:
|
||||
default:
|
||||
$ref: "#/components/responses/PlainTextError"
|
||||
|
||||
/api/admin/article/upload:
|
||||
post:
|
||||
tags: [admin/article]
|
||||
summary: 上传文章图片
|
||||
security:
|
||||
- bearerAuth: []
|
||||
requestBody:
|
||||
required: true
|
||||
content:
|
||||
multipart/form-data:
|
||||
schema:
|
||||
type: object
|
||||
properties:
|
||||
file:
|
||||
type: string
|
||||
format: binary
|
||||
required:
|
||||
- file
|
||||
responses:
|
||||
"200":
|
||||
description: 上传结果
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ArticleUploadResponse"
|
||||
default:
|
||||
$ref: "#/components/responses/PlainTextError"
|
||||
|
||||
/api/admin/article-group/page:
|
||||
post:
|
||||
tags: [admin/article-group]
|
||||
|
||||
Reference in New Issue
Block a user