AliyunpanUploader

public class AliyunpanUploader : NSObject

上传器

  • 上传文件

    Declaration

    Swift

    public func upload(
        fileURL: URL,
        fileName: String? = nil,
        driveId: String,
        folderId: String = "root",
        checkNameMode: AliyunpanFile.CheckNameMode = .ignore,
        useProof: Bool = false,
        session: URLSession = URLSession.shared
    ) async throws -> AliyunpanFile

    Parameters

    fileURL

    文件 URL

    fileName

    文件名,可选,不填时为 fileURL.lastPathComponent

    driveId

    目标 drive id

    folderId

    目标文件夹 id

    checkNameMode

    重名策略,默认 .ignore

    useProof

    使用秒传,默认 false

    session

    上传使用的 URLSession

    Return Value

    AliyunpanFile