Skip to content

Commit

Permalink
Merge pull request #113 from aramirezj/master
Browse files Browse the repository at this point in the history
feat(image type upload): adds support to .heic Files
  • Loading branch information
dfa1234 authored Jul 26, 2024
2 parents 1b91f31 + dfbab3f commit 1a9c2ce
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions projects/ngx-image-compress/src/lib/image-compress.ts
Original file line number Diff line number Diff line change
@@ -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<DOC_ORIENTATION> {
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit 1a9c2ce

Please sign in to comment.