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,
|
2024-11-04 15:55:34 +08:00
|
|
|
"workflow_file_upload_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"),
|
|
|
|
}
|
2024-11-01 15:51:22 +08:00
|
|
|
|
|
|
|
|
|
|
|
file_fields_with_signed_url = {
|
|
|
|
"id": fields.String,
|
|
|
|
"name": fields.String,
|
|
|
|
"size": fields.Integer,
|
|
|
|
"extension": fields.String,
|
|
|
|
"url": fields.String,
|
|
|
|
"mime_type": fields.String,
|
|
|
|
"created_by": fields.String,
|
|
|
|
"created_at": TimestampField,
|
|
|
|
}
|