Browse Source

fic(nc-gui): PR review changes

pull/7605/head
Ramesh Mane 9 months ago
parent
commit
efab4246bf
  1. 4
      packages/nc-gui/components/cell/attachment/utils.ts

4
packages/nc-gui/components/cell/attachment/utils.ts

@ -330,12 +330,12 @@ export const [useProvideAttachmentCell, useAttachmentCell] = useInjectionState(
return { return {
mimetype: response.headers.get('content-type') || undefined, mimetype: response.headers.get('content-type') || undefined,
size: +(response.headers.get('content-length') || 0) || undefined, size: +(response.headers.get('content-length') || 0) || undefined,
} as { minetype?: string; size?: number } } as { mimetype?: string; size?: number }
} else if (imageUrl.slice(imageUrl.lastIndexOf('.') + 1).toLowerCase().length) { } else if (imageUrl.slice(imageUrl.lastIndexOf('.') + 1).toLowerCase().length) {
return { return {
mimetype: `image/${imageUrl.slice(imageUrl.lastIndexOf('.') + 1).toLowerCase()}`, mimetype: `image/${imageUrl.slice(imageUrl.lastIndexOf('.') + 1).toLowerCase()}`,
size: +(response.headers.get('content-length') || 0) || undefined, size: +(response.headers.get('content-length') || 0) || undefined,
} as { minetype?: string; size?: number } } as { mimetype?: string; size?: number }
} }
} }
} catch (err) { } catch (err) {

Loading…
Cancel
Save