fix(upload_image): 优化临时文件删除逻辑及提示文本显示
- 仅在jpg文件类型时删除临时文件,防止误删其他文件类型 - 修正上传图片提示中相册最大数量变量显示问题,提升用户体验
This commit is contained in:
@@ -77,8 +77,10 @@ class UploadOss {
|
||||
);
|
||||
print("response ===== $response");
|
||||
EasyLoading.dismiss();
|
||||
/// 删除临时文件
|
||||
File(path).deleteSync();
|
||||
if(fileType == 'jpg'){
|
||||
/// 删除临时文件
|
||||
File(path).deleteSync();
|
||||
}
|
||||
// 成功后返回文件访问路径
|
||||
return "$ossHost/$ossDirectory$pathName";
|
||||
} on DioError catch (e) {
|
||||
|
||||
Reference in New Issue
Block a user