files: supports text, woff

This commit is contained in:
@wwwjim 2020-09-07 22:23:22 -07:00
parent b86f8701e6
commit a1766efc55
2 changed files with 8 additions and 4 deletions

View File

@ -100,6 +100,14 @@ export const password = (text) => {
};
export const isFileTypeAllowed = (type = "") => {
if (type.startsWith("text/")) {
return true;
}
if (type.startsWith("application/font-woff")) {
return true;
}
if (type.startsWith("application/pdf")) {
return true;
}

View File

@ -62,10 +62,6 @@ export default class SlateMediaObject extends React.Component {
element = <object css={STYLES_OBJECT} data={url} type={type} />;
}
if (type.startsWith("application/epub")) {
element = <div css={STYLES_FAILURE}>No Preview</div>;
}
if (type.startsWith("video/")) {
element = (
<video autoPlay playsInline controls name="media" css={STYLES_OBJECT}>