2024-04-23 11:03:34 +00:00
|
|
|
|
# coding=utf-8
|
|
|
|
|
|
"""
|
|
|
|
|
|
@project: maxkb
|
|
|
|
|
|
@Author:虎
|
|
|
|
|
|
@file: image_api.py
|
|
|
|
|
|
@date:2024/4/23 11:23
|
|
|
|
|
|
@desc:
|
|
|
|
|
|
"""
|
|
|
|
|
|
from drf_yasg import openapi
|
|
|
|
|
|
|
|
|
|
|
|
from common.mixins.api_mixin import ApiMixin
|
2025-01-13 08:38:28 +00:00
|
|
|
|
from django.utils.translation import gettext_lazy as _
|
2024-04-23 11:03:34 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class ImageApi(ApiMixin):
|
|
|
|
|
|
@staticmethod
|
|
|
|
|
|
def get_request_params_api():
|
|
|
|
|
|
return [openapi.Parameter(name='file',
|
|
|
|
|
|
in_=openapi.IN_FORM,
|
|
|
|
|
|
type=openapi.TYPE_FILE,
|
|
|
|
|
|
required=True,
|
2025-01-13 08:38:28 +00:00
|
|
|
|
description=_('image file'))
|
2024-04-23 11:03:34 +00:00
|
|
|
|
]
|