如图,当第一次上传失败,再次点击上传的时候,执行到upManager putData 这行,会提示*** -[CFString length]: message sent to deallocated instance 0x808563c0
这个错误,然后显示的报错行是
[upManager putData:dataObj key:self.picToken token:self.picToken
complete: ^(QNResponseInfo *info, NSString *key, NSDictionary *resp) ...
这里面传递的字符串就是key和token了。。QNUploadManager 会在执行完putData后释放key和token?
而我第二次执行的时候,即使重新生成新的key和token也会报这个错误。
1,首先:你的报错是401 bad token 是从服务端获得的token有问题。
2,看你的token返回的是个json格式的token字符串,你在使用的时候,要解析json对象获得token的value值作为上传的token,不能直接拿json字符串来用,你可以看下是否是这个错误。