From 3e2ad9674c548151b0d5804e42c456a4ce0d77dd Mon Sep 17 00:00:00 2001 From: Bogdan Fazakas Date: Wed, 10 Feb 2021 15:24:16 +0200 Subject: [PATCH] set default value for contentLenght if not received from provider (#372) --- src/utils/provider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/provider.ts b/src/utils/provider.ts index 297eb5c16..c2bd097c4 100644 --- a/src/utils/provider.ts +++ b/src/utils/provider.ts @@ -28,7 +28,7 @@ export async function fileinfo( const { contentLength, contentType } = response.data[0] return { - contentLength, + contentLength: contentLength || '', contentType: contentType || '', // need to do that cause lib-js File interface requires contentType url }