From 5daad51ed5c32c3dead9caec5b8fd5d91916b926 Mon Sep 17 00:00:00 2001 From: ggg7125 <45404855+ggg7125@users.noreply.github.com> Date: Fri, 22 Jan 2021 11:36:13 -0500 Subject: [PATCH] fixed video thumbnail uploads to backblaze when uploading auto-generated video thumbnails to backblaze, the code creates the thumbnail as a jpg, but then tries to locate and upload it to backblaze as a png, resulting in a "file does not exist" error --- lib/uploading/ffmpeg.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/uploading/ffmpeg.js b/lib/uploading/ffmpeg.js index f8bb31d9..609b650d 100644 --- a/lib/uploading/ffmpeg.js +++ b/lib/uploading/ffmpeg.js @@ -62,8 +62,8 @@ function takeAndUploadThumbnail(uploadedPath, uniqueTag, upload, channelUrl, b2, // for b2 integration, upload to b2 if it's prod and you're supposed to if(process.env.NODE_ENV == 'production' && process.env.UPLOAD_TO_B2 == 'true'){ (async function(){ - const response = await b2.uploadFileAsync(`${saveAndServeFilesDirectory}/${channelUrl}/` + uniqueTag + '.png', { - name : hostFilePath + '.png', + const response = await b2.uploadFileAsync(`${saveAndServeFilesDirectory}/${channelUrl}/` + uniqueTag + '.jpg', { + name : hostFilePath + '.jpg', bucket // Optional, defaults to first bucket }); @@ -253,4 +253,4 @@ module.exports = { convertVideo, ffprobePromise, setRedisClient -}; \ No newline at end of file +};