feat: add travel album OTG import flow
This commit is contained in:
@ -74,6 +74,23 @@ final class OSSUploadService {
|
||||
)
|
||||
}
|
||||
|
||||
/// 上传旅拍相册素材,对齐 Android `moduleType = album`。
|
||||
func uploadTravelAlbumMaterial(
|
||||
data: Data,
|
||||
fileName: String,
|
||||
scenicId: Int,
|
||||
onProgress: @escaping (Int) -> Void
|
||||
) async throws -> String {
|
||||
try await uploadFile(
|
||||
data: data,
|
||||
fileName: fileName,
|
||||
fileType: 2,
|
||||
scenicId: scenicId,
|
||||
moduleType: "album",
|
||||
onProgress: onProgress
|
||||
)
|
||||
}
|
||||
|
||||
private func uploadFile(
|
||||
data: Data,
|
||||
fileName: String,
|
||||
@ -162,6 +179,8 @@ enum OSSUploadPolicy {
|
||||
return "bank_card/\(currentDate)/\(scenicId)/\(uploadId)_\(safeName)"
|
||||
case "task_upload":
|
||||
return "task/\(currentDate)/\(scenicId)/\(uploadId)_\(safeName)"
|
||||
case "album":
|
||||
return "album/\(currentDate)/\(scenicId)/\(uploadId)_\(safeName)"
|
||||
case "scenic_apply":
|
||||
return "scenic_apply/\(currentDate)/\(scenicId)/\(uploadId)_\(safeName)"
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user