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

                    let image = UIImage(CIImage: myCIImage)
                    self.imageView.image = image
                    self.updateUI()
//                    println("\(downloadOutput.body)")
                }
            }
            return nil
        })
//        transferManager.download(request).continueWithBlock { [unowned self] (task) -> AnyObject! in
//            if task.error != nil {
//                println("\(task.error)")
//            } else {
//                let image = UIImage(contentsOfFile: downloadingFilePath)
//                self.imageView.image = image
//                println("\(task.result)")
//            }
//            return nil
//        }

        
        let listOjbectsOutput: AWSS3ListObjectsOutput = AWSS3ListObjectsOutput()
        
        var objectSummaries = listOjbectsOutput.contents
//        println("\(objectSummaries)")
    }

    @IBAction func choosePhoto(sender: UIButton) {

    // MARK: - UI Methods
    
    @IBAction func viewPhotosFromAWS(sender: UIButton) {
        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.downloadingFileURL = downloadingFileURL
        
        let transferManager = AWSS3TransferManager.defaultS3TransferManager()
        transferManager.download(request).continueWithExecutor(BFExecutor.mainThreadExecutor(), withBlock: { [unowned self] (task) -> AnyObject! in
