Created
July 28, 2013 03:31
-
-
Save anonymous/6097256 to your computer and use it in GitHub Desktop.
filepicker.io
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
/** | |
* filepicker.io | |
*/ | |
background: #f06; | |
background: linear-gradient(75deg, blue,green, yellow, orange, red,black,white); | |
min-height: 100%; |
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
filepicker.io all javascript | |
// http://closure-compiler.appspot.com/code/jsc37c3d858e3f4d97c1a1733dd0a5fe14e/default.js | |
<script> | |
( | |
function() | |
{ | |
var start = function() { doDialog(); }; | |
if (typeof filepicker=='undefined') | |
{ | |
var s = document.createElement('script'); | |
s.src = 'http://api.filepicker.io/v1/filepicker.js'; | |
if (s.addEventListener) | |
{ | |
s.addEventListener("load", start, false); | |
} | |
else | |
{ | |
s.onreadystatechange=function() | |
{ | |
if (this.readyState=="complete") | |
{ | |
start(); | |
s = null; | |
} | |
} | |
} | |
s.type = "text/javascript"; | |
document.getElementsByTagName('head')[0].appendChild(s); | |
} | |
else | |
{ | |
start(); | |
} | |
} | |
)(); | |
function doDialog() | |
{ | |
filepicker.setKey('A0b1GBdwgSyv6Pop9ZFNQz'); | |
// load dialog | |
filepicker.pick | |
( | |
function(InkBlob) | |
{ | |
console.log(InkBlob.url); | |
} | |
); | |
} | |
/* | |
// save URL to filepicker | |
filepicker.storeUrl("http://cdn.appstorm.net/web.appstorm.net/web/files/2013/06/aologo.png", function(InkBlob){ | |
alert(InkBlob.url) | |
}); | |
*/ | |
/* | |
// save to any. | |
filepicker.exportFile( | |
'https://drpyjw32lhcoa.cloudfront.net/c882d28/img/success.png', | |
{mimetype:'image/png'}, | |
function(InkBlob){ | |
console.log(InkBlob.url); | |
}); | |
*/ | |
</script> |
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
// alert('Hello world!'); |
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
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment