Multiple image uploading on AWS S3 server by RxSwift
pod 'RxCocoa'
pod 'RxSwift'
pod 'AWSS3'
- Download and drop
RRAWSRxUpload.swift & RRAWSstruct.swift
in your project. - Add your AWS S3 account poolId, bucket name and region type in your project.
- Congratulations!
To run the example project, clone the repo, and run pod install from the Example directory first.
// Multiple image uploading
RRAWSRxUpload.upload(dataList: [AWSImageData(type: .image1, image: #imageLiteral(resourceName: "chekbox")), AWSImageData(type: .image2, image: #imageLiteral(resourceName: "l_star_h"))])
.subscribeOn(ConcurrentDispatchQueueScheduler.init(qos: .background))
.observeOn(MainScheduler.instance)
.subscribe(onNext: { response in
print(response)
}, onError: { error in
print(error.localizedDescription)
}).disposed(by: rxbag)
// single image uploading
RRAWSRxUpload.upload(data: AWSImageData(type: .image1, image: #imageLiteral(resourceName: "chekbox")))
.subscribeOn(ConcurrentDispatchQueueScheduler.init(qos: .background))
.observeOn(MainScheduler.instance)
.subscribe(onNext: { response in
print(response)
}, onError: { error in
print(error.localizedDescription)
}).disposed(by: rxbag)
We would love you for the contribution to AWSRxUpload, check the LICENSE
file for more info.
AWSRxUpload is available under the MIT license. See the LICENSE file for more info.