Objective-c - iOS upload to 7Niu South China failed to solve?
我想大声告诉你
我想大声告诉你 2017-05-02 09:36:32
0
0
2882

As shown in the picture, the Android side has been successfully uploaded and the space of South China has been opened. The token is obtained from the background but cannot be uploaded. Please give guidance from experts
// South China

    QNConfiguration *config = [QNConfiguration build:^(QNConfigurationBuilder *builder) {
        builder.zone = [QNZone zone2];
        QNUploadManager *upManager = [[QNUploadManager alloc] initWithConfiguration:config];

// params:nil
// checkCrc:NO
// cancellationSignal:nil];

        //        NSString * token = @"从服务端SDK获取";
        //        NSString * key = @"指定七牛服务上的文件名,或nil";
        //        NSString * filePath = @"要上传的文件路径";
        UIImage *image = [UIImage imageNamed:@"tab@3x"];
        NSData *data = UIImagePNGRepresentation(image);
        [upManager putData:data key:nil token:token complete:^(QNResponseInfo *info, NSString *key, NSDictionary *resp) {
            if(info.ok)
            {
                NSLog(@"请求成功");
            }
            else{
                NSLog(@"失败");
                //如果失败,这里可以把info信息上报自己的服务器,便于后面分析上传错误原因
            }
            NSLog(@"info ===== %@", info);
            NSLog(@"resp ===== %@", resp);
        }
                    option:nil];
    
    }];
    

The following is the content returned by 7Niu (error)
info ===== <QNResponseInfo= id: 557CF907-3307-447C-BB48-BDF7E349BBEE, ver: 7.1.5, status: 400, requestId: CAwAAG5kKu5c1aYU , CAwAAG5kKu5c1aYU, xlog: body:9;UP:9/400;UP:9/400, xvia: (null), host: upload.qiniu.com ip: 183.131.7.18 duration: 0.051881 s time: 1488111322 error: Error Domain= qiniu.com Code=400 "(null)" UserInfo={error=incorrect region, please use up-z2.qiniu.com}>

我想大声告诉你
我想大声告诉你

reply all(0)
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template