Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add saveDataStringAsImageDataToLibrary api, input datastring as parameter. #28

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

SansWord
Copy link

Since canvas on mobile safari has limitation of width and height,
FYI: http://stackoverflow.com/questions/6081483/maximum-size-of-a-canvas-element
We can not always using canvas to generate dataURL.

So we extends your helpful plugin with one extra api to have string as data to store into Library.

And then we can use XHR to grab a image as blob and then using FileReader#readAsDataURL to read out DataURL.
Then save it into Library.

It works for our project, hopefully can make this Plugin more helpful for others.

// successCallback required
module.exports = (function() {

function validateCallBacks(successCallback, failureCallback){
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have to do validation in two apis, so we extract it to this function.

@confile
Copy link

confile commented Apr 7, 2014

It would be great if this gets merged soon!

@Hybrid-Force
Copy link

Very useful feature. Hope it can land soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants