Socket
Socket
Sign inDemoInstall

ember-imgur

Package Overview
Dependencies
2
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ember-imgur

Service allowing your to upload and get images from Imgur using EmberJS


Version published
Weekly downloads
4
increased by300%
Maintainers
1
Install size
18.8 MB
Created
Weekly downloads
 

Readme

Source

Ember-imgur Build Status

This Ember Service allows you to upload and get images from imgur.

Installation

ember install ember-imgur

How to use it

Setup your Client-ID in the config/environment.js file of your project.

var ENV = {
    imgur: {
      clientId: 'YOUR_ID'
    }
};

Then, simply inject the service in your controller or anything else.

export default Ember.Controller.extend({
	imgur: Ember.inject.service()
});

Post an image

imageData is the base64 representation of the image. It shouldn't include the data:image/png;base64, prefix. You can also pass an URL.

this.get('imgur').imagePost(imageData).then((result) => {
	//Result from imgur
}).catch((result) => {
	//Error
});

Get an image

this.get('imgur').imageGet(imageId).then((result) => {
	//Result from imgur
}).catch((result) => {
	//Error
});

Feel free to implement additional features to this addon.

Keywords

FAQs

Last updated on 08 Feb 2016

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