QCloudUploadPartRequest.h 4.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. //
  2. // UploadPart.h
  3. // UploadPart
  4. //
  5. // Created by tencent
  6. // Copyright (c) 2015年 tencent. All rights reserved.
  7. //
  8. // ██████╗ ██████╗██╗ ██████╗ ██╗ ██╗██████╗ ████████╗███████╗██████╗ ███╗ ███╗██╗███╗ ██╗ █████╗ ██╗ ██╗ █████╗ ██████╗
  9. // ██╔═══██╗██╔════╝██║ ██╔═══██╗██║ ██║██╔══██╗ ╚══██╔══╝██╔════╝██╔══██╗████╗ ████║██║████╗ ██║██╔══██╗██║ ██║ ██╔══██╗██╔══██╗
  10. // ██║ ██║██║ ██║ ██║ ██║██║ ██║██║ ██║ ██║ █████╗ ██████╔╝██╔████╔██║██║██╔██╗ ██║███████║██║ ██║ ███████║██████╔╝
  11. // ██║▄▄ ██║██║ ██║ ██║ ██║██║ ██║██║ ██║ ██║ ██╔══╝ ██╔══██╗██║╚██╔╝██║██║██║╚██╗██║██╔══██║██║ ██║ ██╔══██║██╔══██╗
  12. // ╚██████╔╝╚██████╗███████╗╚██████╔╝╚██████╔╝██████╔╝ ██║ ███████╗██║ ██║██║ ╚═╝ ██║██║██║ ╚████║██║ ██║███████╗ ███████╗██║ ██║██████╔╝
  13. // ╚══▀▀═╝ ╚═════╝╚══════╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚═╝ ╚═╝╚══════╝ ╚══════╝╚═╝ ╚═╝╚═════╝
  14. //
  15. //
  16. // _ __ _ _
  17. // (_) / _| | | | |
  18. // ___ ___ _ ____ ___ ___ ___ | |_ ___ _ __ __| | _____ _____| | ___ _ __ ___ _ __ ___
  19. // / __|/ _ \ '__\ \ / / |/ __/ _ \ | _/ _ \| '__| / _` |/ _ \ \ / / _ \ |/ _ \| '_ \ / _ \ '__/ __|
  20. // \__ \ __/ | \ V /| | (_| __/ | || (_) | | | (_| | __/\ V / __/ | (_) | |_) | __/ | \__
  21. // |___/\___|_| \_/ |_|\___\___| |_| \___/|_| \__,_|\___| \_/ \___|_|\___/| .__/ \___|_| |___/
  22. // ______ ______ ______ ______ ______ ______ ______ ______ | |
  23. // |______|______|______|______|______|______|______|______| |_|
  24. //
  25. #import <Foundation/Foundation.h>
  26. #import <QCloudCore/QCloudCore.h>
  27. #import "QCloudUploadPartResult.h"
  28. NS_ASSUME_NONNULL_BEGIN
  29. /**
  30. 对象的名称
  31. */
  32. @interface QCloudUploadPartRequest <BodyType> : QCloudBizHTTPRequest
  33. @property (nonatomic, strong) BodyType body;
  34. /**
  35. 对象的名称
  36. */
  37. @property (strong, nonatomic) NSString *object;
  38. /**
  39. 存储桶名
  40. */
  41. @property (strong, nonatomic) NSString *bucket;
  42. /**
  43. 标识本次分块上传的编号
  44. */
  45. @property (assign, nonatomic) int partNumber;
  46. /**
  47. 标识本次分块上传的 ID;
  48. 使用 Initiate Multipart Upload 接口初始化分片上传时会得到一个 uploadId,该 ID 不但唯一标识这一分块数据,也标识了这分块数据在整个文件内的相对位置
  49. */
  50. @property (strong, nonatomic) NSString *uploadId;
  51. @property (strong, nonatomic) NSString *contentSHA1;
  52. @property (strong, nonatomic) NSString *expect;
  53. /*
  54. 在进行HTTP请求的时候,可以通过设置该参数来设置自定义的一些头部信息。
  55. 通常情况下,携带特定的额外HTTP头部可以使用某项功能,如果是这类需求,可以通过设置该属性来实现。
  56. */
  57. @property (strong, nonatomic) NSDictionary* customHeaders;
  58. - (void) setFinishBlock:(void (^)(QCloudUploadPartResult* result, NSError * error))QCloudRequestFinishBlock;
  59. @end
  60. NS_ASSUME_NONNULL_END