mirror of
https://github.com/stashapp/stash.git
synced 2025-12-17 20:34:37 +03:00
Don't show dialog when setting front movie image (#678)
This commit is contained in:
@@ -3,7 +3,12 @@ import Jimp from "jimp";
|
||||
|
||||
const readImage = (file: File, onLoadEnd: (imageData: string) => void) => {
|
||||
const reader: FileReader = new FileReader();
|
||||
reader.onloadend = () => onLoadEnd(reader.result as string);
|
||||
reader.onloadend = () => {
|
||||
// only proceed if no error encountered
|
||||
if (!reader.error) {
|
||||
onLoadEnd(reader.result as string);
|
||||
}
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user