Browse Source

Merge pull request #15787 from vvlladd28/fix/iot-hub-webp-image-extension

fix(iot-hub): include webp in device package image extensions
pull/15193/head
Igor Kulikov 3 months ago
committed by GitHub
parent
commit
30533414ae
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.ts

2
ui-ngx/src/app/modules/home/components/iot-hub/device-install-dialog/device-install-dialog.component.ts

@ -143,7 +143,7 @@ export class TbDeviceInstallDialogComponent extends DialogComponent<TbDeviceInst
));
const JSZip = (await import('jszip')).default;
const zip = await JSZip.loadAsync(zipData);
const imageExtensions = new Set(['png', 'jpg', 'jpeg', 'gif', 'svg']);
const imageExtensions = new Set(['png', 'jpg', 'jpeg', 'gif', 'svg', 'webp']);
for (const [path, entry] of Object.entries(zip.files) as [string, any][]) {
if (!entry.dir) {
const ext = path.split('.').pop()?.toLowerCase();

Loading…
Cancel
Save