feat: 更新素材管理和举报风险地图
This commit is contained in:
@ -109,6 +109,24 @@ final class OSSUploadService {
|
||||
)
|
||||
}
|
||||
|
||||
/// 上传素材管理素材,对齐 Android `moduleType = material`。
|
||||
func uploadMaterialFile(
|
||||
data: Data,
|
||||
fileName: String,
|
||||
fileType: Int,
|
||||
scenicId: Int,
|
||||
onProgress: @escaping (Int) -> Void
|
||||
) async throws -> String {
|
||||
try await uploadFile(
|
||||
data: data,
|
||||
fileName: fileName,
|
||||
fileType: fileType,
|
||||
scenicId: scenicId,
|
||||
moduleType: "material",
|
||||
onProgress: onProgress
|
||||
)
|
||||
}
|
||||
|
||||
/// 上传直播封面,对齐 Android `moduleType = live_covers`。
|
||||
func uploadLiveCover(
|
||||
data: Data,
|
||||
@ -217,6 +235,8 @@ extension OSSUploadService: OSSUploadServing {}
|
||||
|
||||
extension OSSUploadService: SampleOSSUploading {}
|
||||
|
||||
extension OSSUploadService: MaterialOSSUploading {}
|
||||
|
||||
enum OSSUploadPolicy {
|
||||
static let maxFileSize = 2_048 * 1_024 * 1_024
|
||||
private static let allowedExtensions: Set<String> = ["mp4", "mov", "m4v", "avi", "png", "jpg", "jpeg", "heic", "heif"]
|
||||
@ -256,6 +276,8 @@ enum OSSUploadPolicy {
|
||||
return "album/\(currentDate)/\(scenicId)/\(uploadId)_\(safeName)"
|
||||
case "sample":
|
||||
return "sample/\(currentDate)/\(scenicId)/\(uploadId)_\(safeName)"
|
||||
case "material":
|
||||
return "material/\(currentDate)/\(scenicId)/\(uploadId)_\(safeName)"
|
||||
case "scenic_apply":
|
||||
return "scenic_apply/\(currentDate)/\(scenicId)/\(uploadId)_\(safeName)"
|
||||
case "live_covers":
|
||||
|
||||
Reference in New Issue
Block a user