diff --git a/lib/web/imageRouter/filesystem.ts b/lib/web/imageRouter/filesystem.ts index 79aefa0db..a1b6b3fc8 100644 --- a/lib/web/imageRouter/filesystem.ts +++ b/lib/web/imageRouter/filesystem.ts @@ -17,7 +17,7 @@ const FilesystemUploadProvider: UploadProvider = { return } - callback(null, (new URL(path.basename(imagePath), config.serverURL + '/uploads/')).href) + callback(undefined, (new URL(path.basename(imagePath), config.serverURL + '/uploads/')).href) } } diff --git a/lib/web/imageRouter/imgur.ts b/lib/web/imageRouter/imgur.ts index b3ae606b1..487c1599a 100644 --- a/lib/web/imageRouter/imgur.ts +++ b/lib/web/imageRouter/imgur.ts @@ -20,7 +20,7 @@ const ImgurUploadProvider: UploadProvider = { imgur.uploadFile(imagePath) .then(function (json) { logger.debug(`SERVER uploadimage success: ${JSON.stringify(json)}`) - callback(null, json.data.link.replace(/^http:\/\//i, 'https://')) + callback(undefined, json.data.link.replace(/^http:\/\//i, 'https://')) }).catch(function (err) { callback(new Error(err), undefined) })