# Pull Request Template ## Description This PR expands the default upload rules to support PFX certificate files (`application/x-pkcs12`, `application/pkcs12`, `.pfx`) across private notes, Website, Email, and Telegram channels. Also adds `.xls` / `.xlsx` extension fallbacks for cases where browsers upload Excel files with an empty or generic MIME type. ### Utils Repo PR: https://github.com/chatwoot/utils/pull/61 Fixes https://linear.app/chatwoot/issue/CW-7085/support-more-file-types-in-private-notes-and-in-app ## Type of change - [x] New feature (non-breaking change which adds functionality) ## How Has This Been Tested? ### Screenshots <img width="330" height="218" alt="image" src="https://github.com/user-attachments/assets/80823250-893e-4509-adb9-61f845359151" /> ## Checklist: - [x] My code follows the style guidelines of this project - [x] I have performed a self-review of my code - [ ] I have commented on my code, particularly in hard-to-understand areas - [ ] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [ ] I have added tests that prove my fix is effective or that my feature works - [x] New and existing unit tests pass locally with my changes - [ ] Any dependent changes have been merged and published in downstream modules --------- Co-authored-by: aakashb95 <aakashbakhle@gmail.com>
40 lines
873 B
Vue
40 lines
873 B
Vue
<script setup>
|
|
import { computed } from 'vue';
|
|
import Icon from 'next/icon/Icon.vue';
|
|
|
|
const { fileType } = defineProps({
|
|
fileType: {
|
|
type: String,
|
|
required: true,
|
|
},
|
|
});
|
|
|
|
const fileTypeIcon = computed(() => {
|
|
const fileIconMap = {
|
|
'7z': 'i-woot-file-zip',
|
|
csv: 'i-woot-file-csv',
|
|
doc: 'i-woot-file-doc',
|
|
docx: 'i-woot-file-doc',
|
|
json: 'i-woot-file-txt',
|
|
odt: 'i-woot-file-doc',
|
|
pdf: 'i-woot-file-pdf',
|
|
pfx: 'i-woot-file-pfx',
|
|
ppt: 'i-woot-file-ppt',
|
|
pptx: 'i-woot-file-ppt',
|
|
rar: 'i-woot-file-zip',
|
|
rtf: 'i-woot-file-doc',
|
|
tar: 'i-woot-file-zip',
|
|
txt: 'i-woot-file-txt',
|
|
xls: 'i-woot-file-xls',
|
|
xlsx: 'i-woot-file-xls',
|
|
zip: 'i-woot-file-zip',
|
|
};
|
|
|
|
return fileIconMap[fileType] || 'i-teenyicons-text-document-solid';
|
|
});
|
|
</script>
|
|
|
|
<template>
|
|
<Icon :icon="fileTypeIcon" />
|
|
</template>
|