Skip to content

Commit 15ac688

Browse files
committed
release: v2.3.0
1 parent 3ca9e03 commit 15ac688

File tree

9 files changed

+73
-49
lines changed

9 files changed

+73
-49
lines changed

README.md

Lines changed: 25 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</a>
77
</div>
88

9-
&emsp;&emsp;一款基于flutter的手机端云存储平台/图床管理和文件上传/下载工具,最新版本**V2.2.4**,与PicGo配置互通,可直接扫码导入,主要功能包括云存储/图床/云服务器平台,以及网盘管理(通过[Alist](https://alist.nn.ci/zh/)),文件上传和下载管理,以及各种格式的链接分享。
9+
&emsp;&emsp;一款基于flutter的手机端云存储平台/图床管理和文件上传/下载工具,最新版本**V2.3.0**,与PicGo配置互通,可直接扫码导入,主要功能包括云存储/图床/云服务器平台,以及网盘管理(通过[Alist](https://alist.nn.ci/zh/)),文件上传和下载管理,以及各种格式的链接分享。
1010

1111
&emsp;&emsp;支持多种图片/PDF/文本文件/音视频的在线预览和播放,具体支持的格式请查看[支持的格式列表](https://github.com/Kuingsmile/PicHoro/blob/main/supported_format.md "支持的格式列表")
1212

@@ -51,32 +51,32 @@
5151

5252
## 文件预览支持
5353

54-
| 平台 | 图片 | PDF | 文本文件 | 视频 |
55-
| ------ | :--: | :-: | :------: | :--: |
56-
| Alist |||| |
57-
| 阿里云 |||| |
58-
| S3 |||| |
59-
| 腾讯云 |||| |
60-
| 又拍云 |||| |
61-
| 七牛云 |||| |
62-
| WebDav |||| |
63-
| FTP |||| |
64-
| Github |||| |
65-
| Imgur |||| |
66-
| 兰空 |||| |
67-
| SM.MS |||| |
54+
| 平台 | 图片 | PDF | 文本文件 | 视频 |
55+
| ------ | :---: | :---: | :------: | :---: |
56+
| Alist | || | |
57+
| 阿里云 | || | |
58+
| S3 | || | |
59+
| 腾讯云 | || | |
60+
| 又拍云 | || | |
61+
| 七牛云 | || | |
62+
| WebDav | || | |
63+
| FTP | || | |
64+
| Github | || | |
65+
| Imgur | || | |
66+
| 兰空 | || | |
67+
| SM.MS | || | |
6868

6969
## 下载
7070

7171
### 安卓
7272

7373
Github下载地址 [Github release](https://github.com/Kuingsmile/PicHoro/releases)
7474

75-
我的个人网站提供的最新版本下载地址 [https://pichoro.msq.pub/PicHoro_V2.2.4.apk](https://pichoro.msq.pub/PicHoro_V2.2.4.apk)
75+
我的个人网站提供的最新版本下载地址 [https://pichoro.msq.pub/PicHoro_V2.3.0.apk](https://pichoro.msq.pub/PicHoro_V2.3.0.apk)
7676

7777
### IOS
7878

79-
由于个人没有Mac和开发者账号,暂时无法提供IOS版本,如果有人愿意帮忙开发IOS版本,可以联系我,我会提供相关的技术支持。
79+
由于个人没有Mac,无法提供IOS版本,如果有人愿意帮忙开发IOS版本,可以联系我,我会提供相关的技术支持。
8080

8181
## 应用截图
8282

@@ -109,19 +109,20 @@ Github下载地址 [Github release](https://github.com/Kuingsmile/PicHoro/releas
109109

110110
  详细更新日志请查看[更新日志](https://github.com/Kuingsmile/PicHoro/blob/main/Version_update_log.md "更新日志")
111111

112+
## 2024-04-13 **V2.3.0**
113+
114+
- 新增:优化了smms图床的配置检查速度
115+
- 新增:阿里云新增了对`oss-cn-wuhan`地域的支持
116+
- 新增:现在允许s3图床桶名含有大写字母
117+
- 修复:修复了github图床自定义域名以多个`/`结尾时,返回路径错误的问题
118+
- 修复:修复了图片链接格式设置为BBcode时上传报错的问题
119+
112120
## 2024-02-21 **V2.2.4**
113121

114122
- 新增:七牛云新增 `亚太-河内`区域支持
115123
- 新增:优化了github用户名的判断逻辑
116124
- 修复:修复了七牛云检查配置时,即使配置正确也会提示错误的问题
117125

118-
## 2023-11-25 **V2.2.3**
119-
120-
- 新增: 现在支持为alist设置网址拼接路径
121-
- 新增: 现在支持从文件管理器分享图片快速启动PicHoro
122-
- 修复: 修复了兰空图床配置项相册id没有正常生效的问题
123-
- 修复了视频无法预览播放的问题
124-
125126
## 开发交流
126127

127128
开发进度可以查看 [Projects](https://github.com/Kuingsmile/PicHoro/projects),会同步更新开发进度。

Version_update_log.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# 更新日志
22

3+
## 2024-04-13 **V2.3.0**
4+
5+
- 新增:优化了smms图床的配置检查速度
6+
- 新增:阿里云新增了对`oss-cn-wuhan`地域的支持
7+
- 新增:现在允许s3图床桶名含有大写字母
8+
- 修复:修复了github图床自定义域名以多个`/`结尾时,返回路径错误的问题
9+
- 修复:修复了图片链接格式设置为BBcode时上传报错的问题
10+
311
## 2024-02-21 **V2.2.4**
412

513
- 新增:七牛云新增`亚太-河内`区域支持

assets/files/UpdateLog.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# 更新日志
22

3+
## 2024-04-13 **V2.3.0**
4+
5+
- 新增:优化了smms图床的配置检查速度
6+
- 新增:阿里云新增了对`oss-cn-wuhan`地域的支持
7+
- 新增:现在允许s3图床桶名含有大写字母
8+
- 修复:修复了github图床自定义域名以多个`/`结尾时,返回路径错误的问题
9+
- 修复:修复了图片链接格式设置为BBcode时上传报错的问题
10+
311
## 2024-02-01 **V2.2.4**
412

513
- 新增:七牛云新增`亚太-河内`区域支持

lib/api/smms_api.dart

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,42 +4,45 @@ import 'package:horopic/utils/global.dart';
44
import 'package:path/path.dart' as my_path;
55

66
class SmmsImageUploadUtils {
7+
static const _baseUrl = "https://smms.app/api/v2";
8+
static const _uploadEndpoint = "/upload";
9+
static const _deleteEndpoint = "/delete";
10+
11+
static Dio _getDio(Map configMap) {
12+
BaseOptions options = setBaseOptions();
13+
options.headers = {
14+
"Authorization": configMap["token"],
15+
"Content-Type": "multipart/form-data",
16+
};
17+
return Dio(options);
18+
}
19+
720
//上传接口
8-
static uploadApi({
21+
static Future<List<String>> uploadApi({
922
required String path,
1023
required String name,
1124
required Map configMap,
1225
Function(int, int)? onSendProgress,
1326
CancelToken? cancelToken,
1427
}) async {
1528
try {
16-
String formatedURL = '';
1729
FormData formdata = FormData.fromMap({
1830
"smfile": await MultipartFile.fromFile(path, filename: my_path.basename(name)),
1931
"format": "json",
2032
});
2133

22-
BaseOptions options = setBaseOptions();
23-
options.headers = {
24-
"Authorization": configMap["token"],
25-
"Content-Type": "multipart/form-data",
26-
};
27-
Dio dio = Dio(options);
28-
String uploadUrl = "https://smms.app/api/v2/upload";
34+
Dio dio = _getDio(configMap);
2935
var response = await dio.post(
30-
uploadUrl,
36+
"$_baseUrl$_uploadEndpoint",
3137
data: formdata,
3238
onSendProgress: onSendProgress,
3339
cancelToken: cancelToken,
3440
);
3541
if (response.statusCode == 200 && response.data!['success'] == true) {
3642
String returnUrl = response.data!['data']['url'];
3743
String pictureKey = response.data!['data']['hash'];
38-
if (Global.isCopyLink == true) {
39-
formatedURL = linkGenerateDict[Global.defaultLKformat]!(returnUrl, name);
40-
} else {
41-
formatedURL = returnUrl;
42-
}
44+
String formatedURL =
45+
Global.isCopyLink == true ? linkGenerateDict[Global.defaultLKformat]!(returnUrl, name) : returnUrl;
4346
return ["success", formatedURL, returnUrl, pictureKey];
4447
} else {
4548
return ["failed"];
@@ -57,7 +60,7 @@ class SmmsImageUploadUtils {
5760
}
5861
}
5962

60-
static deleteApi({required Map deleteMap, required Map configMap}) async {
63+
static Future<List<String>> deleteApi({required Map deleteMap, required Map configMap}) async {
6164
Map<String, dynamic> formdata = {
6265
"hash": deleteMap["pictureKey"],
6366
"format": "json",
@@ -68,7 +71,7 @@ class SmmsImageUploadUtils {
6871
"Authorization": configMap["token"],
6972
};
7073
Dio dio = Dio(options);
71-
String deleteUrl = "https://smms.app/api/v2/delete/${deleteMap["pictureKey"]}";
74+
String deleteUrl = '$_baseUrl$_deleteEndpoint/${deleteMap["pictureKey"]}';
7275

7376
try {
7477
var response = await dio.get(deleteUrl, queryParameters: formdata);

lib/api/tencent_api.dart

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,24 +8,27 @@ import 'package:horopic/utils/common_functions.dart';
88
import 'package:horopic/utils/global.dart';
99

1010
class TencentImageUploadUtils {
11+
static String _hmacSha1(String key, String data) {
12+
return Hmac(sha1, utf8.encode(key)).convert(utf8.encode(data)).toString();
13+
}
14+
1115
//表单上传的signature
1216
static String getUploadAuthorization(
1317
String secretKey,
1418
String keyTime,
1519
String uploadPolicyStr,
1620
) {
17-
String signKey = Hmac(sha1, utf8.encode(secretKey)).convert(utf8.encode(keyTime)).toString();
21+
String signKey = _hmacSha1(secretKey, keyTime);
1822
String stringtosign = sha1.convert(utf8.encode(uploadPolicyStr)).toString();
19-
String signature = Hmac(sha1, utf8.encode(signKey)).convert(utf8.encode(stringtosign)).toString();
20-
return signature;
23+
return _hmacSha1(signKey, stringtosign);
2124
}
2225

2326
//authorization
2427
static String getDeleteAuthorization(String method, String urlpath, Map header, String secretId, String secretKey) {
2528
int startTimestamp = DateTime.now().millisecondsSinceEpoch ~/ 1000;
2629
int endTimestamp = startTimestamp + 86400;
2730
String keyTime = '$startTimestamp;$endTimestamp';
28-
String signKey = Hmac(sha1, utf8.encode(secretKey)).convert(utf8.encode(keyTime)).toString();
31+
String signKey = _hmacSha1(secretKey, keyTime);
2932
String lowerMethod = method.toLowerCase();
3033
String headerList = '';
3134
String httpHeaders = '';

lib/picture_host_manage/manage_api/aliyun_manage_api.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ class AliyunManageAPI {
1919
'oss-cn-shanghai': '华东2(上海)',
2020
'oss-cn-nanjing': '华东5(南京本地地域)',
2121
'oss-cn-fuzhou': '华东6(福州本地地域)',
22+
'oss-cn-wuhan': '华中1(武汉本地地域)',
2223
'oss-cn-qingdao': '华北1(青岛)',
2324
'oss-cn-beijing': '华北2(北京)',
2425
'oss-cn-zhangjiakou': '华北3(张家口)',
@@ -28,7 +29,7 @@ class AliyunManageAPI {
2829
'oss-cn-heyuan': '华南2(河源)',
2930
'oss-cn-guangzhou': '华南3(广州)',
3031
'oss-cn-chengdu': '西南1(成都)',
31-
'oss-cn-hongkong': '中国(香港)',
32+
'oss-cn-hongkong': '中国香港',
3233
'oss-us-west-1': '美国(硅谷)',
3334
'oss-us-east-1': '美国(弗吉尼亚)',
3435
'oss-ap-northeast-1': '日本(东京)',

lib/picture_host_manage/manage_api/qiniu_manage_api.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class QiniuManageAPI {
1616
'z0': 'https://upload.qiniup.com', //华东
1717
'cn-east-2': 'https://upload-cn-east-2.qiniup.com', //华东 浙江2
1818
'z1': 'https://upload-z1.qiniup.com', //华北
19-
'z2': 'https://upload-z2.qiniup.com', //华南
19+
'z2': 'https://upload-z2.qiniup.com', //广东
2020
'na0': 'https://upload-na0.qiniup.com', //北美
2121
'as0': 'https://upload-as0.qiniup.com', //东南亚
2222
'ap-northeast-1': 'https://upload-ap-northeast-1.qiniup.com', //亚太首尔

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
1717
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
1818
# In Windows, build-name is used as the major, minor, and patch parts
1919
# of the product and file versions while build-number is used as the build suffix.
20-
version: 2.2.2+1
20+
version: 2.3.0+1
2121

2222
environment:
2323
sdk: ^3.0.0

version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"version": "2.2.4"
2+
"version": "2.3.0"
33
}

0 commit comments

Comments
 (0)