mirror of
https://github.com/stashapp/stash.git
synced 2025-12-18 21:04:37 +03:00
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:
@@ -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>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user