Socket
Socket
Sign inDemoInstall

ember-cli-cloudinary

Package Overview
Dependencies
189
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ember-cli-cloudinary

Ember addon for Cloudinary


Version published
Weekly downloads
3
decreased by-66.67%
Maintainers
1
Install size
18.9 MB
Created
Weekly downloads
 

Readme

Source

ember-cli-cloudinary

Ember addon for Cloudinary

Installation

ember install ember-cli-cloudinary

Add your cloud name & api key to config/environment.js ENV:

cloudinary: {
  cloudName: 'some_cloud_name',
  apiKey: 'some_api_key'
},

Components

cloudinary-image

This component will render an <img> built from a cloudinary url and options.

{{cloudinary-image 'imageId' (hash width=100)}}

Width and height attributes are set on the img tag as well as passed to cloudinary, allowing you to specify the resolution via the "dpr" attribute.

{{cloudinary-image 'imageId' (hash width=100 height=100 dpr="2.0")}}

cloudinary-direct-file

This component will sign and upload a file directly to Cloudinary from the browser. After a successful upload it will pass the signed response to your server.

{{cloudinary-direct-file signatureEndpoint='/sign_upload'}}

Set signatureEndpoint to the API endpoint that signs your cloudinary direct upload requests.

You can also set an action for different events. For example when the file is done uploading:

{{cloudinary-direct-file signatureEndpoint='/sign_upload' onUploadDone=(action 'showThumbnail')}}
Options
optiondefaultInfo
name'file'Name of the input
multiplefalseTrue if you want to upload more than one file
accept'image/jpeg,image/gif,image/png'Files types allowed in the input type file
styleEmber.String.htmlSafe("")Component style
signatureEndpointnullSigns your cloudinary direct upload requests
disableImageResizenull-
imageMaxWidth10000000Image max width
imageMaxHeight10000000Image max height
acceptFileTypes[Regex with image extensions]Files extension allowed (checked by code)
maxFileSize50000000Max File Size
loadImageMaxFileSize50000000Load Image Max File Size
Events
EventInfo
onUploadDoneFile uploaded
fileProgressFile progress
allFileProgressMore than one file progress
onUploadStartUpload Starts
onUploadStopUpload Stops
onUploadFailUpload Fails
onUploadAlwaysUpload Always

Running Tests

  • npm test (Runs ember try:testall to test your addon against multiple Ember versions)
  • ember test
  • ember test --server

Keywords

FAQs

Last updated on 10 Aug 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc