mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-27 01:03:08 +03:00
files: supports text, woff
This commit is contained in:
parent
b86f8701e6
commit
a1766efc55
@ -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;
|
||||
}
|
||||
|
@ -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}>
|
||||
|
Loading…
Reference in New Issue
Block a user