FFile 0.1.10

FFile 0.1.10

测试已测试
Lang语言 Obj-CObjective C
许可协议 MIT
发布最后发布2016年9月

Muqq维护。



 
依赖项
AWSCore= 2.4.7
AWSS3= 2.4.7
SPTPersistentCache>= 0
 

FFile 0.1.10

  • 作者
  • Muqq

要求

iOS >= 8.0

安装

FFile 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中

pod "FFile"

入门

FFile.setup("<Your AWS identity pool Id>",
 s3URL: "<AWS Region URL>",
 s3Bucket: "<AWS bucket>", 
 s3Region: "<Your AWS bucket region>" 

描述

保存文件

  • 保存到 S3
let file = FFile(name: "example", data: data, fileExtension: "png")
file.saveInBackgroundWithBlock { success, error in
    if success {
        //Do something if success
    } else {
        // handle error
    }
}
  • 保存到 S3 后,将文件引用与您的数据一起上传到 Firebase
//get your objectId and save it to anywhere
file.objectId

获取数据

//use objectId to get your file
let file = FFile(objectId: objectId)
file.getDataInBackgroundWithBlock { data, error in
    if error {
        // handle error
    } else {
        // use your data
    }
}

作者

muqq, [email protected]

许可协议

FFile 在 MIT 许可协议下可用。有关更多信息,请参阅 LICENSE 文件。