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
0 parents
commit 6c7a395
Showing
271 changed files
with
42,937 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
var express = require('express'); | ||
var app = express(); | ||
|
||
var db = []; | ||
|
||
var template = { | ||
"$result": { | ||
"head": { | ||
"actions": { | ||
"$pull": { | ||
"type": "$media.camera", | ||
"success": { | ||
"type": "$network.upload", | ||
"options": { | ||
"storage": { | ||
"type": "s3", | ||
"bucket": "fm.ethan.jason", | ||
"path": "", | ||
"sign_url": "https://imagejason.herokuapp.com/sign_url" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"body": { | ||
"sections": [{ | ||
"items": [{ | ||
"type": "label", | ||
"text": "Pull me", | ||
"style": { | ||
"padding": "20", | ||
"align": "center" | ||
} | ||
}] | ||
}] | ||
} | ||
} | ||
}; | ||
|
||
app.get('/sign_url', function (req, res) { | ||
var sig = require('amazon-s3-url-signer'); | ||
console.log("params = ", req.body); | ||
|
||
/* | ||
var bucket1 = sig.urlSigner('my key', 'my secret'); | ||
var url1 = bucket1.getUrl('GET', 'somefile.png', 'mybucket', 10); //url expires in 10 minutes | ||
var url2 = bucket2.getUrl('PUT', '/somedir/somefile.png', 'mybucketonotheraccount', 10); //url expires in 100 minutes | ||
*/ | ||
res.json({"$result": "success"}); | ||
}); | ||
app.get('/', function (req, res) { | ||
res.json(template); | ||
}); | ||
|
||
app.listen(3000, function () { | ||
console.log('Example app listening on port 3000!'); | ||
}); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.