add video upload support
This commit is contained in:
parent
5c050e078b
commit
7cba11f90c
2 changed files with 4 additions and 2 deletions
|
@ -24,7 +24,9 @@ class FileUploader extends React.Component {
|
|||
thumbnailWidth: 200,
|
||||
thumbnailHeight: 200,
|
||||
// TODO what is a good list of MIME types????
|
||||
acceptedFiles: 'image/*,audio/*,text/javascript,text/html,text/css,application/json,application/x-font-ttf,application/x-font-truetype,text/plain,text/csv,.obj',
|
||||
acceptedFiles: `image/*,audio/*,text/javascript,text/html,text/css,
|
||||
application/json,application/x-font-ttf,application/x-font-truetype,
|
||||
text/plain,text/csv,.obj,video/webm,video/ogg,video/quicktime,video/mp4`,
|
||||
dictDefaultMessage: 'Drop files here to upload or click to use the file browser',
|
||||
accept: this.props.dropzoneAcceptCallback,
|
||||
sending: this.props.dropzoneSendingCallback,
|
||||
|
|
|
@ -174,7 +174,7 @@ class PreviewFrame extends React.Component {
|
|||
this.props.jsFiles.forEach(jsFile => {
|
||||
const newJSFile = { ...jsFile };
|
||||
let jsFileStrings = newJSFile.content.match(/(['"])((\\\1|.)*?)\1/gm);
|
||||
const jsFileRegex = /^('|")(?!(http:\/\/|https:\/\/)).*\.(png|jpg|jpeg|gif|bmp|mp3|wav|aiff|ogg|json|txt|csv|svg|obj)('|")$/i;
|
||||
const jsFileRegex = /^('|")(?!(http:\/\/|https:\/\/)).*\.(png|jpg|jpeg|gif|bmp|mp3|wav|aiff|ogg|json|txt|csv|svg|obj|mp4|ogg|webm|mov)('|")$/i;
|
||||
jsFileStrings = jsFileStrings || [];
|
||||
jsFileStrings.forEach(jsFileString => {
|
||||
if (jsFileString.match(jsFileRegex)) {
|
||||
|
|
Loading…
Reference in a new issue