BBASMPlugin+BOS.h 1.24 KB
//
//  BBASMPlugin+PrivateFile.h
//  BBAMNPPyramid
//
//  Created by jiangkun02 on 2020/3/24.
//  Copyright © 2020 Baidu. All rights reserved.
//

#import "BBASMPlugin.h"

UIKIT_EXTERN NSString * _Nullable const BBASMExtFileModuleName;

NS_ASSUME_NONNULL_BEGIN

@interface BBASMPlugin (BBSMBOS)

/**
 * 描  述: 上传文件到BOS
 * 示  例: baiduboxapp://swanAPI/uploadFileToBos?params={"path": "bdfile://XXX","type": "image","cb": "_bdbox_pjs_xxx"}
 * 文  档: http://es.baidu-int.com/#/apidetail/1078
 * 备  注:
 * ********** description ************
 * @name:     uploadFileToBos
 * @authority: swanAPI
 * @path:      /uploadFileToBos
 * @args:      [{"name": "cb", "value": "string"}, {"name": "filePath",  "value": "string"}]
 * @config:    {"swan": {"web": {"invoke": "swan.message.url", "handler": "bridge"}, "jsc": {"invoke": "swan.method.json", "method": "_naSwan.bridge.fileBridge.uploadFileToBos"}}}
*/
- (void)uploadFileToBos:(BBASchemeDispatcher *)dispatcher;

#pragma mark - scheme和binding公共逻辑


+ (NSDictionary *)uploadFileToBosWithAppID:(NSString *)appID
                                    params:(NSDictionary *)params
                                completion:(void (^)(NSDictionary *))completion;

@end

NS_ASSUME_NONNULL_END