This commit is contained in:
Christopher Cookman 2023-08-18 20:23:38 -06:00
parent c4cca8c929
commit de148ab579
Signed by: ChrisChrome
GPG key ID: A023A26E42C33A42

View file

@ -59,6 +59,7 @@ app.post('/sms', async (req, res) => {
filename = data.MediaURLs[i].split("/").pop();
out['images'].push({ name: filename, attachment: data.MediaURLs[i] });
} else if (data.MediaURLs[i].includes(".3gp")) { // Weird file format, convert it to mp4
await (async () => {
// get file name from URL
filename = data.MediaURLs[i].split("/").pop();
// Download the file
@ -92,6 +93,7 @@ app.post('/sms', async (req, res) => {
console.log(e.code);
console.log(e.msg);
}
})();
}
}