我是AWS S3的新用户,正在处理有多个视频文件的应用程序如何上传?请帮忙..
func uploadData(data: NSData) {
let expression = AWSS3TransferUtilityUploadExpression()
expression.progressBlock = progressBlock
let transferUtility = AWSS3TransferUtility.defaultS3TransferUtility()
transferUtility.uploadData(
data,
bucket: S3BucketName,
key: S3UploadKeyName,
contentType: Contenttype,
expression: expression,
completionHander: completionHandler).continueWithBlock { (task) -> AnyObject! in
if let error = task.error {
NSLog("Error: %@",error.localizedDescription);
}
if let exception = task.exception {
NSLog("Exception: %@",exception.description);
}
if let _ = task.result {
NSLog("Upload Starting!")
}
return nil;
}
}
我这样做,但只有一个视频工作...