Created
January 10, 2017 06:05
-
-
Save ruseel/b761eed232fad91b98db3c5707a23008 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(requrie 'org.jclouds.blobstore2) | |
(alias 'b 'org.jclouds.blobstore2) | |
(def ^:dynamic *blobstore* | |
(b/blobstore | |
"aws-s3" | |
ACCESS_KEY | |
ACCESS_SECRET_KEY | |
"jclouds.endpoint" "http://s3-ap-southeast-1.amazonaws.com")) | |
(b/blobs *blobstore* "bucket-name" :max-results 100) | |
;; | |
;; payload can be InputStream, File, ByteSource | |
;; | |
(b/put-blob *blobstore* "bucket-name" | |
(b/blob "ttt1" :payload "abracadabra abracadabra")) | |
(slurp (b/get-blob-stream *blobstore* "bucket-name" "ttt1")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment