OSSManager.h 1.1 KB

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // OSSManager.h
  3. // AliyunOSSSDK-iOS-Example
  4. //
  5. // Created by huaixu on 2018/10/23.
  6. // Copyright © 2018 aliyun. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <AliyunOSSiOS/AliyunOSSiOS.h>
  10. NS_ASSUME_NONNULL_BEGIN
  11. @interface OSSManager : NSObject
  12. @property (nonatomic, strong) OSSClient *defaultClient;
  13. @property (nonatomic, strong) OSSClient *imageClient;
  14. @property (nonatomic, strong) NSDictionary *OSSInfo;
  15. + (instancetype)sharedManager;
  16. -(void)getOSSInfo;
  17. //普通上传
  18. - (void)asyncPutFile:(NSString *)objectKey localFilePath:(NSString *)filePath thrid:(NSString *)strtime progress:(void (^)(NSInteger,NSString *))progress success:(void (^)(id _Nullable,NSString *))success failure:(void (^)(NSError * _Nonnull,NSString *))failure;
  19. //断点续传
  20. - (void)asyncResumableUploadFile:(NSString *)objectKey localFilePath:(NSString *)filePath thrid:(NSString *)strtime progress:(void (^)(NSInteger,NSString *))prgress success:(void (^)(id _Nullable,NSString *))success failure:(void (^)(NSError * _Nonnull,NSString *))failure;
  21. @end
  22. NS_ASSUME_NONNULL_END