Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
78f78b3
commit 51daa50
Showing
3 changed files
with
53 additions
and
2 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" | ||
"http://www.w3.org/TR/html4/strict.dtd"> | ||
<html><head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> | ||
<meta http-equiv="Content-Style-Type" content="text/css"> | ||
<meta http-equiv="Content-Script-Type" content="text/javascript"> | ||
<title></title> | ||
<script src='http://code.jquery.com/jquery-1.11.0.min.js'></script> | ||
<script src='https://s3.amazonaws.com/web.blitline/underscore-min.js'></script> | ||
<script src='blitline_cors.js'></script> | ||
<script type="text/javascript"> | ||
$(document).ready(function() { | ||
// Reminders: | ||
// Public Token can be found on your blitline home page | ||
// Secret can be found on your blitline home page | ||
// Expires is determined by YOU and represents when this signature will NO LONGER work | ||
// Signature is the SHA256 hexdigest of <SECRET> + expires (in the RFC822 ISO string format) | ||
var myAppId = { | ||
"expires" : "Wed, 1 Jan 2014 00:00:00 +0000", | ||
"signature" : "853c511a9ee225d3182bde4151857552a7f3f95d", | ||
"public_token" : "ZlxIi7oLQqnpJhGhPSgIbA" | ||
}; | ||
|
||
var blitline = new Blitline(); | ||
var events = { | ||
completed : function(results, error) { | ||
alert("Job completed:" + JSON.stringify(results)); | ||
} | ||
} | ||
var json = { "src" : "http://www.google.com/logos/2011/yokoyama11-hp.jpg", "functions" : [ {"name": "blur", "params" : {"radius" : 0.0, "sigma" : 2.0}, "save" : { "s3" : { "bucket" : "bltemp.shortline", "key" : "myexample.jpg" }, "image_identifier" : "MY_CLIENT_ID" }} ]}; | ||
|
||
if (typeof myAppId == 'string' || myAppId instanceof String) { | ||
json["application_id"] = myAppId; | ||
}else { | ||
json["expires"] = myAppId["expires"]; | ||
json["signature"] = myAppId["signature"]; | ||
json["public_token"] = myAppId["public_token"]; | ||
} | ||
|
||
json = JSON.stringify(json); | ||
console.dir(json); | ||
blitline.submit(json, events); | ||
}); | ||
</script> | ||
</head> | ||
<body> | ||
</body> |
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