Liking cljdoc? Tell your friends :D

hub.util.aws

AWS Helpers for image uploading and friends.

AWS Helpers for image uploading and friends.
raw docstring

aws-configclj/s

(aws-config)

Inputs: [] Returns: AWSConfig

Inputs: []
Returns: AWSConfig
raw docstring

AWSConfigclj/s

raw docstring

AWSKeyclj/s


Bucketclj/s

Supported buckets. We only have one for now.

Supported buckets. We only have one for now.
raw docstring

bucket-configclj

(bucket-config conf bucket)

Inputs: [conf :- AWSConfig bucket :- Bucket] Returns: BucketConf

Returns a BucketConf from the supplied AWS config.

Inputs: [conf :- AWSConfig bucket :- Bucket]
Returns: BucketConf

Returns a BucketConf from the supplied AWS config.
raw docstring

bucket-nameclj


BucketConfclj/s


Channelclj/s

core.async channel.

core.async channel.
raw docstring

cloudfront-nameclj


cloudfront-urlclj

(cloudfront-url conf doc bucket-key image-name)

Inputs: [conf :- AWSConfig doc :- {s/Any s/Any} bucket-key :- Bucket image-name :- ImageName] Returns: (s/maybe CloudFrontURL)

Returns a cloudfront URL for the supplied image suitable for splicing into HTML. Example args a user-doc, :photos, and :main-photo.

Inputs: [conf :- AWSConfig doc :- {s/Any s/Any} bucket-key :- Bucket image-name :- ImageName]
Returns: (s/maybe CloudFrontURL)

Returns a cloudfront URL for the supplied image suitable for
   splicing into HTML. Example args a user-doc, :photos,
   and :main-photo.
raw docstring

CloudFrontURLclj/s


content-typesclj/s

Map of content-type to image extension.

Map of content-type to image extension.
raw docstring

crazy-mapclj/s

Map of IE-style, annoying prefixes over to proper image types.

Map of IE-style, annoying prefixes over to proper image types.
raw docstring

CrazyInputclj/s

raw docstring

Credentialsclj/s


current-managerclj

(current-manager cred)

Inputs: [cred :- Credentials] Returns: TransferManager

Returns the current active TransferManager.

Inputs: [cred :- Credentials]
Returns: TransferManager

Returns the current active TransferManager.
raw docstring

generate-keyclj

(generate-key image-name content-type)

Inputs: [image-name :- ImageName content-type :- ImageContent] Returns: AWSKey

Inputs: [image-name :- ImageName content-type :- ImageContent]
Returns: AWSKey
raw docstring

Imageclj

Schema for images that come in via the temporary store, from ring's multipart-params middleware.

Schema for images that come in via the temporary store, from ring's
multipart-params middleware.
raw docstring

ImageContentclj/s

raw docstring

ImageNameclj/s


massage-content-typeclj/s

(massage-content-type t)

Inputs: [t :- (s/either ImageContent CrazyInput)] Returns: ImageContent

Fixes up some of the crazier input types that IE responds to.

Inputs: [t :- (s/either ImageContent CrazyInput)]
Returns: ImageContent

Fixes up some of the crazier input types that IE responds to.
raw docstring

to-streamclj

(to-stream tempfile)

Inputs: [tempfile :- (:tempfile Image)] Returns: InputStream

Inputs: [tempfile :- (:tempfile Image)]
Returns: InputStream
raw docstring

trim-channelclj

(trim-channel chan url)

Inputs: [chan :- Channel url :- AWSKey] Returns: Channel

Modifies a file upload channel to only return success or failure events.

NOTE: Down the road, we could use the other channel elements (bytes transferred so far) to build a client-side upload progress bar.

Inputs: [chan :- Channel url :- AWSKey]
Returns: Channel

Modifies a file upload channel to only return success or failure
events.

NOTE: Down the road, we could use the other channel elements (bytes
transferred so far) to build a client-side upload progress bar.
raw docstring

upload!clj

(upload! conf man bucket key filename)
(upload! conf man bucket key input params)

Inputs: ([conf :- AWSConfig man :- TransferManager bucket :- Bucket key :- AWSKey filename :- String] [conf :- AWSConfig man :- TransferManager bucket :- Bucket key :- AWSKey input :- InputStream params :- {s/Any s/Any}]) Returns: {s/Any s/Any}

Triggers an upload via the TransferManager to s3. Returns a clojure map that represents an AWS Transfer instance. The map goes from method name (in keyword form) -> function with input types as described here: http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/transfer/Transfer.html

Inputs: ([conf :- AWSConfig man :- TransferManager bucket :- Bucket key :- AWSKey filename :- String] [conf :- AWSConfig man :- TransferManager bucket :- Bucket key :- AWSKey input :- InputStream params :- {s/Any s/Any}])
Returns: {s/Any s/Any}

Triggers an upload via the TransferManager to s3. Returns a clojure
map that represents an AWS Transfer instance. The map goes from
method name (in keyword form) -> function with input types as
described here:
http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/s3/transfer/Transfer.html
raw docstring

upload-imageclj

(upload-image aws-config bucket image-name {:keys [tempfile content-type size]})

Inputs: [aws-config :- AWSConfig bucket :- Bucket image-name :- ImageName {:keys [tempfile content-type size]} :- Image] Returns: Channel

Takes an image that'd show up directly from the upload dialogue and starts an asynchronous upload to S3. Returns a channel that reports the success status and the new url on a successful upload.

Uploaded images are cached, by default, for 10 years (see the cache-control header in here)

Inputs: [aws-config :- AWSConfig bucket :- Bucket image-name :- ImageName {:keys [tempfile content-type size]} :- Image]
Returns: Channel

Takes an image that'd show up directly from the upload dialogue and
starts an asynchronous upload to S3. Returns a channel that reports
the success status and the new url on a successful upload.

Uploaded images are cached, by default, for 10 years (see the
cache-control header in here)
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close