From dfbab3f503d2e0c69836814b1b10b67077682449 Mon Sep 17 00:00:00 2001 From: Alejandro Date: Thu, 25 Jul 2024 19:19:07 +0200 Subject: [PATCH] feat: adds support to .heicFiles --- .../ngx-image-compress/src/lib/image-compress.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/projects/ngx-image-compress/src/lib/image-compress.ts b/projects/ngx-image-compress/src/lib/image-compress.ts index 6471d0c..0463831 100644 --- a/projects/ngx-image-compress/src/lib/image-compress.ts +++ b/projects/ngx-image-compress/src/lib/image-compress.ts @@ -1,7 +1,7 @@ -import {Renderer2} from '@angular/core'; -import {DataUrl} from './models/data-url'; -import {DOC_ORIENTATION} from './models/DOC_ORIENTATION'; -import {UploadResponse} from './models/upload-response'; +import { Renderer2 } from '@angular/core'; +import { DataUrl } from './models/data-url'; +import { DOC_ORIENTATION } from './models/DOC_ORIENTATION'; +import { UploadResponse } from './models/upload-response'; export class ImageCompress { getOrientation(file: File): Promise { @@ -113,7 +113,7 @@ export class ImageCompress { const inputElement = render.createElement('input'); render.setStyle(inputElement, 'display', 'none'); render.setProperty(inputElement, 'type', 'file'); - render.setProperty(inputElement, 'accept', 'image/*'); + render.setProperty(inputElement, 'accept', 'image/*, .heic'); if (multiple) { render.setProperty(inputElement, 'multiple', 'true'); @@ -154,7 +154,7 @@ export class ImageCompress { inputElement.id = 'upload-input' + new Date(); inputElement.style.display = 'none'; inputElement.setAttribute('type', 'file'); - inputElement.setAttribute('accept', 'image/*'); + inputElement.setAttribute('accept', 'image/*, .heic'); if (multiple) { inputElement.setAttribute('multiple', 'true');