Skip to content

Commit 05c17e4

Browse files
authored
Merge pull request #363 from YangSen-qn/develop
fix uplog fail
2 parents 97c74b2 + be48079 commit 05c17e4

File tree

6 files changed

+11
-6
lines changed

6 files changed

+11
-6
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#Changelog
2+
## 8.0.2(2020-09-14)
3+
## 修正
4+
- 修复日志上传失败问题
5+
- 优化日志上传逻辑
6+
27
## 8.0.1(2020-09-08)
38
## 优化
49
- 优化一些内存问题

Qiniu.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = 'Qiniu'
3-
s.version = '8.0.1'
3+
s.version = '8.0.2'
44
s.summary = 'Qiniu Resource Storage SDK for iOS and Mac'
55
s.homepage = 'https://github.com/qiniu/objc-sdk'
66
s.social_media_url = 'http://weibo.com/qiniutek'

QiniuSDK/Collect/QNReportConfig.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ - (instancetype)init {
2626
if (self) {
2727
_reportEnable = YES;
2828
_interval = 10;
29-
_serverURL = @"https://uplog.qbox.me/log/4";
29+
_serverURL = @"https://uplog.qbox.me/log/4?compressed=gzip";
3030
_recordDirectory = [NSString stringWithFormat:@"%@/report", [QNUtils sdkCacheDirectory]];
3131
_maxRecordFileSize = 2 * 1024 * 1024;
3232
_uploadThreshold = 4 * 1024;

QiniuSDK/Collect/QNUploadInfoReporter.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ - (void)innerReport:(NSString *)jsonString token:(NSString *)token {
126126
}
127127
}
128128

129-
// 判断是否满足上传条件:文件大于上报临界值 && (首次上传 || 距上次上传时间大于_config.interval)
129+
// 判断是否满足上传条件:文件大于上报临界值 || (首次上传 || 距上次上传时间大于_config.interval)
130130
NSTimeInterval currentTime = [[NSDate dateWithTimeIntervalSinceNow:0] timeIntervalSince1970];
131-
if (file.size > _config.uploadThreshold && (_lastReportTime == 0 || currentTime - _lastReportTime > _config.interval * 60)) {
131+
if (file.size > _config.uploadThreshold || (_lastReportTime == 0 || currentTime - _lastReportTime > _config.interval * 60)) {
132132

133133
NSMutableURLRequest *request = [[NSMutableURLRequest alloc] initWithURL:[NSURL URLWithString:_config.serverURL]];
134134
[request setValue:[NSString stringWithFormat:@"UpToken %@", token] forHTTPHeaderField:@"Authorization"];

QiniuSDK/Utils/QNVersion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@
1111
/**
1212
* sdk 版本
1313
*/
14-
static NSString *const kQiniuVersion = @"8.0.1";
14+
static NSString *const kQiniuVersion = @"8.0.2";

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
通过 CocoaPods
1414

1515
```ruby
16-
pod "Qiniu", "~> 8.0.1"
16+
pod "Qiniu", "~> 8.0.2"
1717
```
1818

1919
## 运行环境

0 commit comments

Comments
 (0)