2023-09-27 16:06:32 +08:00
|
|
|
from flask_restful import fields
|
2024-02-06 13:21:13 +08:00
|
|
|
|
2023-09-27 16:06:32 +08:00
|
|
|
from libs.helper import TimestampField
|
|
|
|
|
|
|
|
upload_config_fields = {
|
2024-08-15 12:54:05 +08:00
|
|
|
"file_size_limit": fields.Integer,
|
|
|
|
"batch_count_limit": fields.Integer,
|
|
|
|
"image_file_size_limit": fields.Integer,
|
2024-10-23 15:23:30 +08:00
|
|
|
"video_file_size_limit": fields.Integer,
|
|
|
|
"audio_file_size_limit": fields.Integer,
|
2023-09-27 16:06:32 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
file_fields = {
|
2024-08-15 12:54:05 +08:00
|
|
|
"id": fields.String,
|
|
|
|
"name": fields.String,
|
|
|
|
"size": fields.Integer,
|
|
|
|
"extension": fields.String,
|
|
|
|
"mime_type": fields.String,
|
|
|
|
"created_by": fields.String,
|
|
|
|
"created_at": TimestampField,
|
|
|
|
}
|
2024-10-21 10:43:49 +08:00
|
|
|
|
|
|
|
remote_file_info_fields = {
|
|
|
|
"file_type": fields.String(attribute="file_type"),
|
|
|
|
"file_length": fields.Integer(attribute="file_length"),
|
|
|
|
}
|