Skip to content

Commit b2ea00a

Browse files
committed
Add .md and .svelte as whitelist for text uploads
Fixes codesandbox#2222
1 parent 23a1f88 commit b2ea00a

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

packages/app/src/app/overmind/namespaces/files/internalActions.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,8 @@ export const uploadFiles: AsyncAction<
9393
/\.haml$/.test(filePath) ||
9494
/\.pug$/.test(filePath) ||
9595
/\.svg$/.test(filePath) ||
96+
/\.md$/.test(filePath) ||
97+
/\.svelte$/.test(filePath) ||
9698
file.type.startsWith('text/') ||
9799
file.type === 'application/json') &&
98100
dataURI.length < MAX_FILE_SIZE

packages/app/src/app/store/modules/files/actions.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ export async function uploadFiles({ api, props, path }) {
139139
/\.haml$/.test(filePath) ||
140140
/\.pug$/.test(filePath) ||
141141
/\.svg$/.test(filePath) ||
142+
/\.md$/.test(filePath) ||
143+
/\.svelte$/.test(filePath) ||
142144
file.type.startsWith('text/') ||
143145
file.type === 'application/json') &&
144146
dataURI.length < MAX_FILE_SIZE

0 commit comments

Comments
 (0)