mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-06 09:13:48 +08:00
fix: 添加扩展名,修改存储位置
This commit is contained in:
@@ -23,13 +23,14 @@ class DownloadUtils {
|
|||||||
var response = await Dio()
|
var response = await Dio()
|
||||||
.get(imgUrl, options: Options(responseType: ResponseType.bytes));
|
.get(imgUrl, options: Options(responseType: ResponseType.bytes));
|
||||||
String picName =
|
String picName =
|
||||||
"plpl_${imgType}_${DateTime.now().toString().split('-').join()}";
|
"PiliPalaX_${imgType}_${DateTime.now().toString().split('-').join()}";
|
||||||
final SaveResult result = await SaverGallery.saveImage(
|
final SaveResult result = await SaverGallery.saveImage(
|
||||||
Uint8List.fromList(response.data),
|
Uint8List.fromList(response.data),
|
||||||
quality: 100,
|
quality: 100,
|
||||||
name: picName,
|
name: picName,
|
||||||
// 保存到 PiliPala文件夹
|
fileExtension: 'jpg',
|
||||||
androidRelativePath: "Pictures/PiliPala",
|
// 保存到 PiliPalaX文件夹
|
||||||
|
androidRelativePath: "Pictures/PiliPalaX",
|
||||||
androidExistNotSave: false,
|
androidExistNotSave: false,
|
||||||
);
|
);
|
||||||
SmartDialog.dismiss();
|
SmartDialog.dismiss();
|
||||||
|
|||||||
Reference in New Issue
Block a user