Skip to content

Commit

Permalink
Added s3 upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ackava committed Sep 13, 2022
1 parent d86a65d commit 0b177a2
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"terminal.integrated.profiles.windows": {
"PowerShell": {
"source": "PowerShell",
"args": [
"-ExecutionPolicy",
"Bypass"
]
}
},
"terminal.integrated.defaultProfile.windows": "PowerShell"
}
9 changes: 4 additions & 5 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@ exports.handler = async (event) => {
rawPath,
queryStringParameters: {
url,
thumbnails,
}
} = {}
} = event;

if (rawPath.startsWith("/probe")) {
return await FFProbe.probe(url);
}
if (rawPath.startsWith("/thumb")) {
return await FFMpeg.thumbnails(url, thumbnails);
}
// if (rawPath.startsWith("/thumb")) {
// return await FFMpeg.thumbnails(url, thumbnails);
// }

return {
event,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"ffmpeg-static": "^5.1.0",
"@azure/storage-blob": "^12.11.0",
"fluent-ffmpeg": "^2.1.2",
"node-fetch": "^2.6.7",
"tmp-promise": "^3.0.3"
},
"devDependencies": {
Expand Down
3 changes: 3 additions & 0 deletions testfx.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const fetch = require("node-fetch");
fetch("https://dhjifbkdiccu3idea5no3cczsq0swjky.lambda-url.us-east-1.on.aws/a",
{ method: "POST", body: "{}", headers: { "content-type": "application/json" } }).then((r) => r.text().then(console.log));

0 comments on commit 0b177a2

Please sign in to comment.