uploadProfilePhotoNew static method
上传身形分析照片(使用新接口)
Implementation
static Future<OrchestratorResponse> uploadProfilePhotoNew(
Uint8List imageBytes,
String? sessionId,
) async {
try {
// 1. 先上传照片获取URL
final uploadResult = await uploadPhotoToServer(
imageBytes: imageBytes,
photoType: 'profile',
);
print('✅ 照片已上传,URL: ${uploadResult.url}');
// 2. 使用URL发送消息
return sendMessage(
message: 'PHOTO_URL:${uploadResult.url}',
sessionId: sessionId,
);
} catch (e) {
print('❌ 上传身形分析照片失败: $e');
rethrow;
}
}