Swift Package Index


Swift Perfect 服务器上传文件到七牛云


  • The latest stable release is 1.0.4. Released 2 years ago.
  • The last commit to master was 2 years ago.

Swift Version Compatibility

  • 1.0.4 and master
    5.3
    5.2
    5.1
    5.0
    4.2
Full build results

Platform Compatibility

  • 1.0.4 and master
    iOS
    macOS(Intel)
    macOS(ARM)
    Linux
    tvOS
    watchOS
Full build results

Perfect-Qiniu:Swift Perfect 服务器上传文件到七牛云

依赖库:

.package(url: "https://github.com/PerfectlySoft/Perfect-CURL.git", from: "3.0.6"),
.package(url: "https://github.com/PerfectlySoft/Perfect-Crypto.git", from: "3.1.2") 

安装:

.package(url: "https://github.com/LeeCenY/Perfect-Qiniu.git", from: "1.0.4") 

使用:


let config = QiniuConfiguration(accessKey: AccessKey, secretKey: SecretKey, scope: scope, fixedZone: .HNzone, DEBUG: false)
_ = try Qiniu.upload(fileName: zipName, file: thisZipFile, config: config)

异常处理:

public enum UploadError: Error {
case badToken
case RequestfFailed(String)
}