如何在iOS中的AWS s3存储桶中上传多个视频?

时间:2017-03-24 11:27:18

标签: ios swift amazon-s3

我是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;
    }
}

我这样做,但只有一个视频工作...

0 个答案:

没有答案