uploadPhoto static method

Future<PhotoUploadResponse> uploadPhoto(
  1. dynamic file, {
  2. String photoType = 'general',
})

上传照片(支持照片类型,支持web和移动端)

file - 要上传的照片文件(File或XFile) photoType - 照片类型:'full_body', 'face_closeup', 'profile', 'tryon', 'general'

返回 PhotoUploadResponse 包含上传后的照片信息 抛出 UploadException 当上传失败时

Implementation

static Future<PhotoUploadResponse> uploadPhoto(
  dynamic file, {
  String photoType = 'general',
}) async {
  return _uploadPhotoUnified(file, photoType: photoType);
}