gongxiangp2/components/upload/upload-constants.ts
2026-05-07 16:37:22 +08:00

47 lines
1.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// 上传相关的常量定义
import {
DOUYIN_ACCOUNT_MAINTENANCE_VIDEO_TYPE,
DOUYIN_QIANCHUAN_VIDEO_TYPE,
INSTALL_VIDEO_TYPE,
TAOXI_GUANGGUANG_VIDEO_TYPE,
TAOXI_MAIN_VIDEO_TYPE,
} from '@/lib/video-material-types'
// 预览图可选的类型列表
export const PREVIEW_OPTIONAL_TYPES: string[] = [
'详情模板',
'模特',
'任务-实拍原图',
'买家秀图片',
'小红书种草',
'主图模版',
// 'SKU模版', // 已移除:SKU模版现在必须上传预览图
'品牌VI灵感',
TAOXI_MAIN_VIDEO_TYPE,
INSTALL_VIDEO_TYPE,
TAOXI_GUANGGUANG_VIDEO_TYPE,
DOUYIN_QIANCHUAN_VIDEO_TYPE,
DOUYIN_ACCOUNT_MAINTENANCE_VIDEO_TYPE,
'音乐',
]
// 上传后需自动填充"通用"店铺/场景的类型(从统一验证库导出以保持一致性)
export { AUTO_GENERAL_TYPES } from '@/lib/material-validation'
// 批量上传限制
export const BATCH_LIMITS = {
music: 100,
video: 8,
'3d': 5,
brandVI: 50,
buyerShow: Infinity, // 每批至少8张图
xiaohongshu: Infinity,
} as const
// 主文件超过 5MB 走分片上传,确保弱网/大文件稳定性
export const CHUNK_THRESHOLD = 5 * 1024 * 1024
// 最大重试次数
export const MAX_RETRY = 2