Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
hackycy committed Dec 10, 2020
2 parents bd71968 + da51b0e commit 8f4957d
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 9 deletions.
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Flutter-PicGo: 一个用于快速上传图片并获取图片URL链接的**手机
# 特色功能

- 长按相册列表项可**同步删除远端的文件**,也可配置仅删除本地列表
- 支持管理(查看或删除)远端图床(内测中,目前支持管理Github、Gitee、SM.MS、兰空、七牛)[v1.9+]
- 支持**管理(查看或删除)远端图床**目前支持管理Github、Gitee、SM.MS、兰空、七牛)[v1.9+]
- 支持扫描二维码将[PicGo(v2.3.0-beta.2以上版本支持将配置导出成二维码)](https://github.com/Molunerfinn/PicGo/releases/tag/v2.3.0-beta.2)配置文件转换成**Flutter-PicGo**的配置
- 适配深色模式,可跟随系统或手动设置
- 支持将*Flutter-PicGo*的配置导出至剪切板
Expand All @@ -56,6 +56,10 @@ Flutter-PicGo: 一个用于快速上传图片并获取图片URL链接的**手机

目前仅支持iOS与Android端,由于部分插件例如[sqflite](https://pub.dev/packages/sqflite)不支持Web端,所以应用也并不支持Web端。

# 注意事项

- [注意事项](https://github.com/PicGo/flutter-picgo/blob/dev/docs/注意事项.md)

# 有问题或者有更好的建议

- 欢迎提 [Issues](https://github.com/PicGo/flutter-picgo/issues)
Expand Down
Binary file added docs/hostconfig.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions docs/version.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"iOS": {
"versionName": "1.8.0",
"versionCode": "16"
"versionName": "1.9.1",
"versionCode": "22"
},
"Android": {
"versionName": "1.9.0",
"versionCode": "20"
"versionName": "1.9.1",
"versionCode": "22"
}
}
17 changes: 17 additions & 0 deletions docs/注意事项.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@


### 功能建议或BUG提交

> 请尽量在Github页面中发起[issue](https://github.com/PicGo/flutter-picgo/issues),否则在其他地方比较难以管理和收集建议。
### 关于Github图片上传问题

> 由于国内访问Github慢的原因,API访问也会经常出错,建议切换别的图床进行使用。
>
> 或者配置host提升访问速度,这里提供一种方式:
>
> ![](https://raw.githubusercontent.com/hackycy/flutter-picgo/dev/docs/hostconfig.jpeg)
>
> 在路由器里面配置hosts,具体配置可以查看[Github520](https://github.com/521xueweihan/GitHub520)
>
> 路由器配置hosts后连接Wi-Fi可以显著提升API的访问能力。
8 changes: 5 additions & 3 deletions lib/utils/strategy/impl/aliyun_image_upload.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'dart:convert';

import 'package:dio/dio.dart';
import 'package:flutter/material.dart';
import 'package:flutter_picgo/api/aliyun_api.dart';
import 'package:flutter_picgo/model/aliyun_config.dart';
import 'package:flutter_picgo/model/uploaded.dart';
Expand Down Expand Up @@ -30,7 +29,6 @@ class AliyunImageUpload implements ImageUploadStrategy {
@override
Future<Uploaded> upload(File file, String renameImage) async {
String configStr = await ImageUploadUtils.getPBConfig(PBTypeKeys.aliyun);
debugPrint(configStr);
if (isBlank(configStr)) {
throw AliyunError(error: '读取配置文件错误!请重试');
}
Expand All @@ -48,7 +46,11 @@ class AliyunImageUpload implements ImageUploadStrategy {
'policy': policy,
'Signature': AliyunApi.buildPostSignature(
config.accessKeyId, config.accessKeySecret, policy),
'file': await MultipartFile.fromFile(file.path, filename: renameImage)
'file':
await MultipartFile.fromFile(file.path, filename: renameImage),
// OSS支持用户在Post请求体中增加x-oss-content-type,该项允许用户指定Content-Type
'x-oss-content-type':
'image/${path.extension(renameImage).replaceFirst('.', '')}'
}));
String imgPath = path.joinAll([
isBlank(config.customUrl)
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.9.0+21
version: 1.9.1+22

environment:
sdk: ">=2.7.0 <3.0.0"
Expand Down

0 comments on commit 8f4957d

Please sign in to comment.