2121@interface QNResumeUpload ()
2222
2323@property (nonatomic , strong ) NSData *data;
24- @property (nonatomic , weak ) QNHttpManager *httpManager;
24+ @property (nonatomic , strong ) QNHttpManager *httpManager;
2525@property UInt32 size;
2626@property (nonatomic ) int retryTimes;
2727@property (nonatomic , strong ) NSString *key;
@@ -32,8 +32,8 @@ @interface QNResumeUpload ()
3232@property (nonatomic , strong ) NSMutableArray *contexts;
3333@property (nonatomic , readonly , getter = isCancelled) BOOL cancelled;
3434
35- @property UInt64 modifyTime;
36- @property (nonatomic , weak ) id <QNRecorderDelegate> recorder;
35+ @property int64_t modifyTime;
36+ @property (nonatomic , strong ) id <QNRecorderDelegate> recorder;
3737
3838@property UInt32 chunkCrc;
3939
@@ -293,18 +293,17 @@ - (void)makeFile:(NSString *)uphost
293293 mime = [[NSString alloc ] initWithFormat: @" /mimetype/%@ " , [QNUrlSafeBase64 encodeString: self .option.mimeType]];
294294 }
295295
296- NSString *url = [[NSString alloc ] initWithFormat: @" http://%@ /mkfile/%u %@ " , uphost, (unsigned int )self .size, mime];
296+ __block NSString *url = [[NSString alloc ] initWithFormat: @" http://%@ /mkfile/%u %@ " , uphost, (unsigned int )self .size, mime];
297297
298298 if (self.key != nil ) {
299299 NSString *keyStr = [[NSString alloc ] initWithFormat: @" /key/%@ " , [QNUrlSafeBase64 encodeString: self .key]];
300300 url = [NSString stringWithFormat: @" %@%@ " , url, keyStr];
301301 }
302302
303303 if (self.option && self.option .params ) {
304- NSEnumerator *e = [self .option.params keyEnumerator ];
305- for (id key = [e nextObject ]; key != nil ; key = [e nextObject ]) {
306- url = [NSString stringWithFormat: @" %@ /%@ /%@ " , url, key, [QNUrlSafeBase64 encodeString: (self .option.params)[key]]];
307- }
304+ [self .option.params enumerateKeysAndObjectsUsingBlock: ^(NSString *key, NSString *obj, BOOL *stop) {
305+ url = [NSString stringWithFormat: @" %@ /%@ /%@ " , url, key, [QNUrlSafeBase64 encodeString: obj]];
306+ }];
308307 }
309308
310309 NSMutableData *postData = [NSMutableData data ];
0 commit comments