37 lines
1.3 KiB
C
37 lines
1.3 KiB
C
|
|
//
|
||
|
|
// QXCOSUploadManager.h
|
||
|
|
// QXLive
|
||
|
|
//
|
||
|
|
// Created by 启星 on 2025/10/23.
|
||
|
|
//
|
||
|
|
|
||
|
|
#import <Foundation/Foundation.h>
|
||
|
|
typedef NS_ENUM(NSInteger, QXCOSUploadImageState) {
|
||
|
|
QXCOSUploadImageFailed = 0,
|
||
|
|
QXCOSUploadImageSuccess = 1
|
||
|
|
};
|
||
|
|
|
||
|
|
NS_ASSUME_NONNULL_BEGIN
|
||
|
|
@class QXCOSUploadCredentialsModel;
|
||
|
|
@interface QXCOSUploadManager : NSObject
|
||
|
|
+(instancetype)shareManager;
|
||
|
|
- (void)uploadFile:(NSArray *_Nonnull)files withObjectKey:(NSArray *)objectKeys isAsync:(BOOL)isAsync complete:(void(^)(NSArray<NSString *> * names, QXCOSUploadImageState state))complete;
|
||
|
|
- (void)activityUploadFile:(NSArray *)files withObjectKey:(NSArray *)objectKeys isAsync:(BOOL)isAsync complete:(void(^)(NSArray<NSString *> *names, QXCOSUploadImageState state))complete;
|
||
|
|
- (NSString *)currentDate;
|
||
|
|
@end
|
||
|
|
|
||
|
|
@interface QXCOSUploadModel : NSObject
|
||
|
|
@property (nonatomic,strong)NSString *bucket;
|
||
|
|
@property (nonatomic,strong)NSString *expiredTime;
|
||
|
|
@property (nonatomic,strong)NSString *startTime;
|
||
|
|
@property (nonatomic,strong)NSString *region;
|
||
|
|
@property (nonatomic,strong)QXCOSUploadCredentialsModel *credentials;
|
||
|
|
@end
|
||
|
|
|
||
|
|
@interface QXCOSUploadCredentialsModel : NSObject
|
||
|
|
@property (nonatomic,strong)NSString *sessionToken;
|
||
|
|
@property (nonatomic,strong)NSString *tmpSecretId;
|
||
|
|
@property (nonatomic,strong)NSString *tmpSecretKey;
|
||
|
|
@end
|
||
|
|
NS_ASSUME_NONNULL_END
|