File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ export const APIKEY_RESTRICTION_REFERRER = "referrer";
2626export const APIKEY_RESTRICTION_IP = "ipaddress" ;
2727export const APIKEY_RESTRICTION_CUSTOM = "custom" ;
2828export const imagePattern = / ^ i m a g e \/ ( j p e ? g | p n g ) $ / ;
29- export const imagePatternIncludingGif = / ^ i m a g e \/ ( j p e ? g | p n g | g i f | w e b p ) $ / ;
29+ export const imagePatternForThumbnailGeneration = / ^ i m a g e \/ ( j p e ? g | p n g | w e b p ) $ / ;
3030export const videoPattern = / v i d e o / ;
3131export const thumbnailWidth = 120 ;
3232export const thumbnailHeight = 69 ;
Original file line number Diff line number Diff line change 55 tempFileDirForUploads ,
66 imagePattern ,
77 videoPattern ,
8- imagePatternIncludingGif ,
8+ imagePatternForThumbnailGeneration ,
99 USE_CLOUDFRONT ,
1010} from "../config/constants" ;
1111import imageUtils from "@medialit/images" ;
@@ -55,7 +55,7 @@ const generateAndUploadThumbnail = async ({
5555 const thumbPath = `${ workingDirectory } /thumb.webp` ;
5656
5757 let isThumbGenerated = false ; // to indicate if the thumbnail name is to be saved to the DB
58- if ( imagePatternIncludingGif . test ( mimetype ) ) {
58+ if ( imagePatternForThumbnailGeneration . test ( mimetype ) ) {
5959 await thumbnail . forImage ( originalFilePath , thumbPath ) ;
6060 isThumbGenerated = true ;
6161 }
You can’t perform that action at this time.
0 commit comments