提交
This commit is contained in:
@@ -28,10 +28,7 @@
|
||||
return self;
|
||||
}
|
||||
-(void)uploadFile:(id)file withObjectKey:(NSString *)key path:(NSString *)path complete:(void (^)(NSString * _Nonnull, QXCOSUploadImageState))complete {
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] getWithUrl:[NSString stringWithFormat:@"%@%@",server,QXGetCosTempKeys] parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
QXCOSUploadModel *model = [QXCOSUploadModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
if (![model.region isExist] || ![model.bucket isExist] || ![model.credentials.sessionToken isExist] || ![model.credentials.tmpSecretId isExist] || ![model.credentials.tmpSecretKey isExist]) {
|
||||
@@ -102,10 +99,7 @@
|
||||
}
|
||||
|
||||
-(void)audioUploadFile:(id)file withObjectKey:(NSString *)key complete:(void (^)(NSString * fileUrl, QXCOSUploadImageState state))complete{
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] getWithUrl:[NSString stringWithFormat:@"%@%@",server,QXGetCosTempKeys] parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
QXCOSUploadModel *model = [QXCOSUploadModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
if (![model.region isExist] || ![model.bucket isExist] || ![model.credentials.sessionToken isExist] || ![model.credentials.tmpSecretId isExist] || ![model.credentials.tmpSecretKey isExist]) {
|
||||
@@ -176,10 +170,7 @@
|
||||
}
|
||||
|
||||
-(void)uploadFile:(NSArray *)files withObjectKey:(NSArray *)objectKeys isAsync:(BOOL)isAsync complete:(void (^)(NSArray<NSString *> * _Nullable, QXCOSUploadImageState))complete{
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] getWithUrl:[NSString stringWithFormat:@"%@%@",server,QXGetCosTempKeys] parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
QXCOSUploadModel *model = [QXCOSUploadModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
if (![model.region isExist] || ![model.bucket isExist] || ![model.credentials.sessionToken isExist] || ![model.credentials.tmpSecretId isExist] || ![model.credentials.tmpSecretKey isExist]) {
|
||||
@@ -276,10 +267,7 @@
|
||||
}
|
||||
|
||||
-(void)activityUploadFile:(NSArray *)files withObjectKey:(NSArray *)objectKeys isAsync:(BOOL)isAsync complete:(void (^)(NSArray<NSString *> * _Nonnull, QXCOSUploadImageState))complete{
|
||||
NSString *server = ServerUrl;
|
||||
if (QXGlobal.shareGlobal.isNeedChangeServer) {
|
||||
server = RServerUrl;
|
||||
}
|
||||
NSString *server = QXGlobal.shareGlobal.currentServer;
|
||||
[[QXRequset shareInstance] getWithUrl:[NSString stringWithFormat:@"%@%@",server,QXGetCosTempKeys] parameters:@{} needCache:NO success:^(id responseObject) {
|
||||
QXCOSUploadModel *model = [QXCOSUploadModel yy_modelWithJSON:responseObject[@"data"]];
|
||||
if (![model.region isExist] || ![model.bucket isExist] || ![model.credentials.sessionToken isExist] || ![model.credentials.tmpSecretId isExist] || ![model.credentials.tmpSecretKey isExist]) {
|
||||
|
||||
Reference in New Issue
Block a user