Request

public struct Request : Codable

Undocumented

  • drive id

    Declaration

    Swift

    public let drive_id: String
  • 根目录为root

    Declaration

    Swift

    public let parent_file_id: String
  • 文件名称,按照 utf8 编码最长 1024 字节,不能以 / 结尾

    Declaration

    Swift

    public let name: String
  • file | folder

    Declaration

    Swift

    public let type: AliyunpanFile.FileType
  • 文件类型

    Declaration

    Swift

    public let content_type: String?
  • 重名策略

    Declaration

    Swift

    public let check_name_mode: AliyunpanFile.CheckNameMode
  • 最大分片数量 10000

    Declaration

    Swift

    public let part_info_list: [AliyunpanFile.PartInfo]?
  • 仅上传livp格式的时候需要,常见场景不需要

    Declaration

    Swift

    public let streams_info: AliyunpanFile.StreamsInfo?
  • 针对大文件sha1计算非常耗时的情况, 可以先在读取文件的前1k的sha1, 如果前1k的sha1没有匹配的, 那么说明文件无法做秒传, 如果1ksha1有匹配再计算文件sha1进行秒传,这样有效边避免无效的sha1计算。

    Declaration

    Swift

    public let pre_hash: String?
  • 秒传必须, 文件大小,单位为 byte

    Declaration

    Swift

    public let size: Int?
  • 秒传必须, 文件内容 hash 值,需要根据 content_hash_name 指定的算法计算,当前都是sha1算法

    Declaration

    Swift

    public let content_hash: String?
  • 秒传必须, 默认都是 sha1

    Declaration

    Swift

    public let content_hash_name: String?
  • 秒传必须

    Declaration

    Swift

    public let proof_code: String?
  • 固定 v1

    Declaration

    Swift

    public let proof_version: String?
  • 本地创建时间,格式yyyy-MM-dd’T'HH:mm:ss.SSS'Z’

    Declaration

    Swift

    public let local_created_at: Date?
  • 本地修改时间,格式yyyy-MM-dd’T'HH:mm:ss.SSS'Z’

    Declaration

    Swift

    public let local_modified_at: Date?
  • Undocumented

    Declaration

    Swift

    public init(
        drive_id: String,
        parent_file_id: String,
        name: String,
        type: AliyunpanFile.FileType = .file,
        content_type: String? = nil,
        check_name_mode: AliyunpanFile.CheckNameMode,
        part_info_list: [AliyunpanFile.PartInfo]? = nil,
        streams_info: AliyunpanFile.StreamsInfo? = nil,
        pre_hash: String? = nil,
        size: Int? = nil,
        content_hash: String? = nil,
        content_hash_name: String? = nil,
        proof_code: String? = nil,
        proof_version: String? = nil,
        local_created_at: Date? = nil,
        local_modified_at: Date? = nil)