Add SVG studio image support, and studio image caching (#418)

* Support SVGs for studio images and add ETAGs
* Add SVG to studio image input
* Update content sniffing
This commit is contained in:
InfiniteTF
2020-04-03 00:11:48 +02:00
committed by GitHub
parent aee9df966b
commit 0f622c84f4
4 changed files with 25 additions and 2 deletions

View File

@@ -5,12 +5,14 @@ interface IImageInput {
isEditing: boolean;
text?: string;
onImageChange: (event: React.FormEvent<HTMLInputElement>) => void;
acceptSVG?: boolean;
}
export const ImageInput: React.FC<IImageInput> = ({
isEditing,
text,
onImageChange
onImageChange,
acceptSVG = false
}) => {
if (!isEditing) return <div />;
@@ -20,7 +22,7 @@ export const ImageInput: React.FC<IImageInput> = ({
<Form.Control
type="file"
onChange={onImageChange}
accept=".jpg,.jpeg,.png"
accept={`.jpg,.jpeg,.png${acceptSVG ? ',.svg' : ''}`}
/>
</Form.Label>
);