uploadTryonPhotoNew static method
上传试衣照片(使用新接口)
Implementation
static Future<OrchestratorResponse> uploadTryonPhotoNew(
Uint8List imageBytes,
String? sessionId,
) async {
try {
// 1. 先上传照片获取URL
final uploadResult = await uploadPhotoToServer(
imageBytes: imageBytes,
photoType: 'tryon',
);
print('✅ 试衣照片已上传,URL: ${uploadResult.url}');
// 2. 使用纯URL发送消息(试衣照片不需要前缀)
return sendMessage(
message: uploadResult.url,
sessionId: sessionId,
);
} catch (e) {
print('❌ 上传试衣照片失败: $e');
rethrow;
}
}