     var aspectRatio:CGFloat {
         return size.height != 0 ? size.width / size.height : 0
     }
-}+}

    // MARK: - UI Methods
    
    @IBAction func viewPhotosFromAWS(sender: UIButton) {
//        let collectionView = AWSPhotoCollectionViewController()
//        collectionView.delegate = self
//        presentViewController(collectionView, animated: true, completion: nil)
        
        let downloadingFilePath = NSTemporaryDirectory().stringByAppendingPathComponent("downloaded-object")
        let downloadingFileURL = NSURL.fileURLWithPath(downloadingFilePath)
        
        let request: AWSS3TransferManagerDownloadRequest = AWSS3TransferManagerDownloadRequest()
        request.bucket = S3BucketName
        request.key = "users/\(cognitoIdentityId!)/test-object"
//        request.key = "users/test_user/test-object"
//        request.key = "test-object"
        request.downloadingFileURL = downloadingFileURL
//        let listObjectsRequest: AWSS3ListObjectsRequest = AWSS3ListObjectsRequest()
//        listObjectsRequest.bucket = S3BucketName
//        listObjectsRequest.prefix = "users/" + cognitoIdentityId!
        
        let transferManager = AWSS3TransferManager.defaultS3TransferManager()
        transferManager.download(request).continueWithExecutor(BFExecutor.mainThreadExecutor(), withBlock: { [unowned self] (task) -> AnyObject! in

        let imageData = UIImagePNGRepresentation(image)
        imageData.writeToFile(path, atomically: true)
        
        let imageURL = NSURL(fileURLWithPath: path)
        let uploadRequest = AWSS3TransferManagerUploadRequest()
        uploadRequest.bucket = S3BucketName
        uploadRequest.key = "users/\(cognitoIdentityId!)/test-object"
        uploadRequest.body = imageURL
        
        let transferManager = AWSS3TransferManager.defaultS3TransferManager()
