添加提交任务流程并抽取资料编辑页
This commit is contained in:
@ -39,6 +39,24 @@ final class OSSUploadService {
|
||||
try await uploadFile(data: data, fileName: fileName, fileType: 2, scenicId: scenicId, moduleType: "bank_card", onProgress: onProgress)
|
||||
}
|
||||
|
||||
/// 上传任务素材,对齐 Android `moduleType = task_upload`。
|
||||
func uploadTaskFile(
|
||||
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: "task_upload",
|
||||
onProgress: onProgress
|
||||
)
|
||||
}
|
||||
|
||||
private func uploadFile(
|
||||
data: Data,
|
||||
fileName: String,
|
||||
@ -125,6 +143,8 @@ enum OSSUploadPolicy {
|
||||
return "real_name/\(currentDate)/\(scenicId)/\(uploadId)_\(safeName)"
|
||||
case "bank_card":
|
||||
return "bank_card/\(currentDate)/\(scenicId)/\(uploadId)_\(safeName)"
|
||||
case "task_upload":
|
||||
return "task/\(currentDate)/\(scenicId)/\(uploadId)_\(safeName)"
|
||||
default:
|
||||
return "task/\(currentDate)/\(scenicId)/\(uploadId)_\(safeName)"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user