修复素材上传 OSS 路径并完善调试与表单交互。

对齐 Android material/{scenicId}/0/ 目录结构以修复视频元数据写入失败,补充 API 请求体调试日志、素材拍摄麦克风权限与上传控件点击穿透修复。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-13 11:19:58 +08:00
parent 005349f8e6
commit 7deeedec68
5 changed files with 72 additions and 3 deletions

View File

@ -114,6 +114,24 @@ final class MaterialManagementAPITests: XCTestCase {
XCTAssertNil(editBody["project_id"])
}
func testMaterialOSSObjectKeyMatchesAndroidFolderLayout() {
var calendar = Calendar(identifier: .gregorian)
calendar.timeZone = TimeZone(secondsFromGMT: 0)!
let date = calendar.date(from: DateComponents(year: 2026, month: 7, day: 13))!
let uuid = UUID(uuidString: "11111111-2222-3333-4444-555555555555")!
let key = OSSUploadPolicy.objectKey(
fileName: "video/demo.mp4",
scenicId: 9,
moduleType: "material",
date: date,
uuid: uuid,
timeZone: TimeZone(secondsFromGMT: 0)!
)
XCTAssertEqual(key, "material/9/0/11111111222233334444555555555555_video_demo.mp4")
}
private func envelopeJSON(_ dataJSON: String) -> Data {
"""
{"code":100000,"msg":"success","data":\(dataJSON)}