Skip to content

Sync-in · Sovereign platform for file storage, sharing, synchronization, and collaboration.

chore(onlyoffice): add md, vsdx and odg to viewable extensions

johavene7d771d83ad6
diff --git a/backend/src/applications/files/constants/only-office.ts b/backend/src/applications/files/constants/only-office.ts
index 2116c287..6f83ff78 100644
--- a/backend/src/applications/files/constants/only-office.ts
+++ b/backend/src/applications/files/constants/only-office.ts
@@ -10,76 +10,124 @@ export const ONLY_OFFICE_TOKEN_QUERY_PARAM_NAME = 'token' as const
export const ONLY_OFFICE_EXTENSIONS = {
VIEWABLE: new Map([
+ // WORD
['doc', 'word'],
- ['dotm', 'word'],
+ ['docm', 'word'],
+ ['docx', 'word'],
['dot', 'word'],
+ ['dotm', 'word'],
+ ['dotx', 'word'],
+ ['epub', 'word'],
+ ['fb2', 'word'],
['fodt', 'word'],
- ['ott', 'word'],
- ['rtf', 'word'],
- ['txt', 'word'],
+ ['gdoc', 'word'],
+ ['htm', 'word'],
+ ['html', 'word'],
+ ['hwp', 'word'],
+ ['hwpx', 'word'],
+ ['md', 'word'],
['mht', 'word'],
['mhtml', 'word'],
- ['html', 'word'],
- ['htm', 'word'],
- ['epub', 'word'],
- ['fb2', 'word'],
- ['sxw', 'word'],
+ ['odt', 'word'],
+ ['ott', 'word'],
+ ['pages', 'word'],
+ ['rtf', 'word'],
['stw', 'word'],
+ ['sxw', 'word'],
+ ['txt', 'word'],
['wps', 'word'],
['wpt', 'word'],
- ['pages', 'word'],
- ['docxf', 'word'],
- ['oform', 'word'],
- ['xls', 'cell'],
- ['xlsb', 'cell'],
- ['xltm', 'cell'],
- ['xlt', 'cell'],
- ['fods', 'cell'],
- ['ots', 'cell'],
- ['sxc', 'cell'],
+ ['xml', 'word'],
+
+ // CELL
+ ['csv', 'cell'],
['et', 'cell'],
['ett', 'cell'],
+ ['fods', 'cell'],
+ ['gsheet', 'cell'],
['numbers', 'cell'],
- ['ppt', 'slide'],
- ['pptx', 'slide'],
- ['ppsx', 'slide'],
- ['ppsm', 'slide'],
- ['pps', 'slide'],
- ['potm', 'slide'],
- ['pot', 'slide'],
+ ['ods', 'cell'],
+ ['ots', 'cell'],
+ ['sxc', 'cell'],
+ ['xls', 'cell'],
+ ['xlsm', 'cell'],
+ ['xlsx', 'cell'],
+ ['xlt', 'cell'],
+ ['xltm', 'cell'],
+ ['xltx', 'cell'],
+
+ // SLIDE
+ ['dps', 'slide'],
+ ['dpt', 'slide'],
['fodp', 'slide'],
+ ['gslide', 'slide'],
+ ['key', 'slide'],
+ ['odg', 'slide'],
+ ['odp', 'slide'],
['otp', 'slide'],
+ ['pot', 'slide'],
+ ['potm', 'slide'],
+ ['potx', 'slide'],
+ ['pps', 'slide'],
+ ['ppsm', 'slide'],
+ ['ppsx', 'slide'],
+ ['ppt', 'slide'],
+ ['pptm', 'slide'],
+ ['pptx', 'slide'],
['sxi', 'slide'],
- ['dps', 'slide'],
- ['dpt', 'slide'],
- ['key', 'slide']
+
+ // PDF
+ ['djvu', 'pdf'],
+ ['docxf', 'pdf'],
+ ['oform', 'pdf'],
+ ['oxps', 'pdf'],
+ ['pdf', 'pdf'],
+ ['xps', 'pdf'],
+
+ // DIAGRAM
+ ['vsdm', 'diagram'],
+ ['vsdx', 'diagram'],
+ ['vssm', 'diagram'],
+ ['vssx', 'diagram'],
+ ['vstm', 'diagram'],
+ ['vstx', 'diagram']
]),
+
EDITABLE: new Map([
- ['doc', 'word'],
+ // WORD
+ ['docm', 'word'],
['docx', 'word'],
- ['dotx', 'word'],
['dotm', 'word'],
- ['docm', 'word'],
+ ['dotx', 'word'],
+ ['epub', 'word'],
+ ['fb2', 'word'],
+ ['html', 'word'],
['odt', 'word'],
['ott', 'word'],
['rtf', 'word'],
['txt', 'word'],
- ['xls', 'cell'],
+
+ // CELL
+ ['xlsb', 'cell'],
+ ['xlsm', 'cell'],
['xlsx', 'cell'],
+ ['xltm', 'cell'],
['xltx', 'cell'],
- ['xlsm', 'cell'],
+ ['csv', 'cell'],
['ods', 'cell'],
['ots', 'cell'],
- ['csv', 'cell'],
- ['ppt', 'slide'],
- ['pptx', 'slide'],
- ['potx', 'slide'],
+
+ // SLIDE
['potm', 'slide'],
- ['pptm', 'slide'],
+ ['potx', 'slide'],
['ppsm', 'slide'],
['ppsx', 'slide'],
+ ['pptm', 'slide'],
+ ['pptx', 'slide'],
['odp', 'slide'],
['otp', 'slide'],
+
+ // PDF
['pdf', 'pdf']
])
}
diff --git a/frontend/src/assets/mimes/application-vnd.visio.svg b/frontend/src/assets/mimes/application-vnd.visio.svg
new file mode 100644
index 00000000..da5b8245
--- /dev/null
+++ b/frontend/src/assets/mimes/application-vnd.visio.svg
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Livello_1" xmlns:x="http://ns.adobe.com/Extensibility/1.0/" xmlns:i="http://ns.adobe.com/AdobeIllustrator/10.0/" xmlns:graph="http://ns.adobe.com/Graphs/1.0/" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 2112.25 2011.641" enable-background="new 0 0 2112.25 2011.641" xml:space="preserve">
+<metadata>
+ <sfw xmlns="http://ns.adobe.com/SaveForWeb/1.0/">
+ <slices/>
+ <sliceSourceBounds bottomLeftOrigin="true" height="2011.641" width="2112.25" x="-1082.417" y="-931.52"/>
+ </sfw>
+</metadata>
+<path fill="#2B7CD3" d="M1148.159,502.913h872.057c50.829,0,92.034,41.205,92.034,92.034v821.766 c0,50.829-41.205,92.034-92.034,92.034h-872.057c-50.829,0-92.034-41.205-92.034-92.034V594.947 C1056.125,544.118,1097.33,502.913,1148.159,502.913z"/>
+<path fill="#41A5EE" d="M1609.333,502.913c0.102,24.41-9.697,47.818-27.158,64.876L1207,942.965l-35.707,35.707 c-4.626,4.456-9.495,8.654-14.585,12.573c-15.053,9.507-32.488,14.563-50.292,14.585c-24.41,0.102-47.818-9.697-64.876-27.158 L630.657,567.789c-31.013-30.579-36.069-78.823-12.07-115.168c3.594-5.202,7.632-10.082,12.07-14.585L1041.54,27.154 c35.304-35.83,92.97-36.256,128.801-0.952c0.32,0.315,0.637,0.632,0.952,0.952l410.883,410.883 C1599.636,455.095,1609.435,478.503,1609.333,502.913z"/>
+<path fill="#103F91" d="M1609.333,1508.746c-0.012,277.753-225.186,502.907-502.939,502.895 c-179.658-0.008-345.667-95.853-435.504-251.436c-9.677-16.085-18.084-32.9-25.146-50.292c-7.41-16.35-13.793-33.147-19.111-50.292 c-83.326-264.96,63.917-547.301,328.877-630.627c48.83-15.356,99.718-23.168,150.906-23.165c17.099,0,33.695,1.006,50.292,2.515 c16.906,1.454,33.703,3.974,50.292,7.544C1441.009,1063.993,1609.051,1269.844,1609.333,1508.746z"/>
+<path opacity="0.1" enable-background="new " d="M1207,544.655v1073.224c-0.25,37.292-22.849,70.794-57.333,84.993 c-10.98,4.645-22.78,7.039-34.701,7.041H645.745c-7.41-16.35-13.793-33.147-19.111-50.292 c-83.326-264.96,63.917-547.301,328.877-630.627c48.83-15.356,99.718-23.168,150.905-23.165 c-24.41,0.102-47.818-9.697-64.876-27.158L630.657,567.789c-31.013-30.579-36.069-78.823-12.07-115.168h496.379 c34.426,0.206,65.859,19.609,81.473,50.292C1203.507,515.681,1207.146,530.062,1207,544.655z"/>
+<path opacity="0.2" enable-background="new " d="M1156.708,594.947v1073.224c-0.002,11.922-2.396,23.722-7.041,34.701 c-14.199,34.484-47.701,57.083-84.993,57.333H670.891c-9.677-16.085-18.084-32.9-25.146-50.292 c-7.41-16.35-13.793-33.147-19.111-50.292c-83.326-264.96,63.917-547.301,328.877-630.627 c48.83-15.356,99.718-23.168,150.906-23.165c-24.41,0.102-47.818-9.697-64.876-27.158L630.657,567.789 c-17.46-17.058-27.259-40.466-27.157-64.876h461.175c25.505-0.089,49.837,10.704,66.888,29.672 C1147.64,549.373,1156.644,571.702,1156.708,594.947z"/>
+<path opacity="0.2" enable-background="new " d="M1156.708,594.947v972.641c-0.383,50.669-41.365,91.651-92.034,92.034h-438.04 c-83.326-264.96,63.917-547.301,328.877-630.627c48.83-15.356,99.718-23.168,150.906-23.165 c-24.41,0.102-47.818-9.697-64.876-27.158L630.657,567.789c-17.46-17.058-27.259-40.466-27.157-64.876h461.175 c25.505-0.089,49.837,10.704,66.888,29.672C1147.64,549.373,1156.644,571.702,1156.708,594.947z"/>
+<path opacity="0.2" enable-background="new " d="M1106.417,594.947v410.883c-24.41,0.102-47.818-9.697-64.876-27.158 L630.657,567.789c-17.46-17.058-27.259-40.466-27.157-64.876h410.883C1065.132,503.106,1106.224,544.198,1106.417,594.947z"/>
+<path opacity="0.2" enable-background="new " d="M1106.417,1005.83v561.758c-0.383,50.669-41.364,91.651-92.034,92.034H626.634 c-83.326-264.96,63.917-547.301,328.877-630.627C1004.341,1013.638,1055.229,1005.827,1106.417,1005.83z"/>
+<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="192.2069" y1="1683.361" x2="914.2097" y2="432.882" gradientTransform="matrix(1 0 0 -1 0 2114.2429)">
+ <stop offset="0" style="stop-color:#2368C4"/>
+ <stop offset="0.5" style="stop-color:#1A5DBE"/>
+ <stop offset="1" style="stop-color:#1146AC"/>
+</linearGradient>
+<path fill="url(#SVGID_1_)" d="M92.185,502.913h922.047c50.912,0,92.185,41.272,92.185,92.185v922.047 c0,50.912-41.272,92.185-92.185,92.185H92.185C41.272,1609.33,0,1568.057,0,1517.145V595.098 C0,544.186,41.272,502.913,92.185,502.913z"/>
+<path fill="#FFFFFF" d="M523.033,1153.084c16.932,49.889,26.99,81.372,30.175,94.448h2.062 c3.051-13.076,13.931-46.788,32.639-101.136l134.128-389.962h123.315l-227.57,599.326H485.717l-224.2-599.326h126.836 L523.033,1153.084z"/>
+</svg>
\ No newline at end of file