This file contains 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
dataURItoBlob = function(dataURI) { | |
var array, binary, i; | |
binary = atob(dataURI.split(",")[1]); | |
array = []; | |
i = 0; | |
while (i < binary.length) { | |
array.push(binary.charCodeAt(i)); | |
i++; | |
} | |
return new Blob([new Uint8Array(array)], { |
This file contains 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
var AWS = require('aws-sdk'); | |
AWS.config.update({ | |
accessKeyId: '{AWS_KEY}', | |
secretAccessKey: '{AWS_SECRET}', | |
region: '{SNS_REGION}' | |
}); | |
var sns = new AWS.SNS(); |