From 8c7426d93a7afd007fc7726f402b7969ea5f57d0 Mon Sep 17 00:00:00 2001 From: Petru Paler Date: Sat, 29 Apr 2023 06:46:18 +0100 Subject: [PATCH] Hack around the .heic extensions from Instagram. --- sync.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sync.js b/sync.js index 2ed9b89..312e8f3 100644 --- a/sync.js +++ b/sync.js @@ -110,7 +110,9 @@ async function doWork() { //Download the media to our server const parts = post.media_url.split('/'); - const fileName = parts[parts.length - 1].split('?')[0]; + // HACK: despite the .heic extensions, these are JPEG files right now + // This will probably change in the future and break things. + const fileName = parts[parts.length - 1].split('?')[0].replace('.heic', '.jpg'); const downloader = new Downloader({ url: post.media_url,