uploadImage method
- String? imagePath,
- Uint8List? byteData,
- bool secureResource = true,
KO: 이미지 업로드
imagePath에 이미지 파일 경로 전달
secureResource로 이미지 URL을 HTTPS로 설정
EN: Upload image
Pass image file path to imagePath
Set whether to use HTTPS for the image URL with secureResource
Implementation
Future<ImageUploadResult> uploadImage({
String? imagePath,
Uint8List? byteData,
bool secureResource = true,
}) {
if (imagePath == null && byteData == null) {
throw KakaoClientException(
ClientErrorCause.badParameter,
'Either image file or byte data must be provided.',
);
}
SdkLog.d(
'[ShareClient.uploadImage] started | hasImagePath=${imagePath != null} hasByteData=${byteData != null} secureResource=$secureResource',
);
return _api.uploadImage(imagePath, byteData, secureResource);
}