Skip to content

Commit 85e099b

Browse files
committed
Adjust acceptable upload types for markdown drag and drop in WM
1 parent 11adadb commit 85e099b

File tree

1 file changed

+41
-2
lines changed
  • src/components/ChallengeEditor/Description-Field

1 file changed

+41
-2
lines changed

src/components/ChallengeEditor/Description-Field/index.js

+41-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,47 @@ const clientObject = client.init(FILE_PICKER_API_KEY)
2020
const maxUploadSize = 40 * 1024 * 1024
2121
const maxCommentLength = 16000
2222
const imageExtensions = ['gif', 'png', 'jpeg', 'jpg', 'bmp', 'svg']
23-
const allowedImageExtensions = [...imageExtensions, ...imageExtensions.map(key => `image/${key}`)]
24-
const allowedOtherExtensions = []
23+
const allowedImageExtensions = [
24+
...imageExtensions,
25+
...imageExtensions.map(key => `image/${key}`)
26+
]
27+
const allowedOtherExtensions = [
28+
'application/zip',
29+
'zip',
30+
'application/octet-stream',
31+
'application/x-zip-compressed',
32+
'multipart/x-zip',
33+
'text/plain',
34+
'txt',
35+
'mov',
36+
'video/mpeg',
37+
'mp4',
38+
'video/mp4',
39+
'webm',
40+
'video/webm',
41+
'doc',
42+
'docx',
43+
'pdf',
44+
'application/pdf',
45+
'csv',
46+
'text/csv',
47+
'htm',
48+
'html',
49+
'text/html',
50+
'js',
51+
'json',
52+
'application/json',
53+
'application/msword',
54+
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
55+
'application/vnd.ms-excel',
56+
'xls',
57+
'xlsx',
58+
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
59+
'ppt',
60+
'application/vnd.ms-powerpoint',
61+
'pptx',
62+
'application/vnd.openxmlformats-officedocument.presentationml.presentation'
63+
]
2564
const errorMessages = {
2665
noFileGiven: 'Select a file.',
2766
typeNotAllowed:

0 commit comments

Comments
 (0)