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

                    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) {

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