(file: IAttachmentValue)
| 188 | * Whether to display thumbnails of the original image, e.g. not after the volume exceeds 20Mb |
| 189 | */ |
| 190 | export const showOriginImageThumbnail = (file: IAttachmentValue) => { |
| 191 | const fileArgument = { name: file.name, type: file.mimeType }; |
| 192 | return (isPdf(fileArgument) && file.preview) || (isImage(fileArgument) && !imageSizeExceeded(file.size) && isSupportImage(file.mimeType)); |
| 193 | }; |
| 194 | |
| 195 | export const isSupportImage = (mimeType: string) => { |
| 196 | return !NO_SUPPORT_IMG_MIME_TYPE.includes(mimeType); |
no test coverage detected