mirror of
https://github.com/Mintplex-Labs/anything-llm.git
synced 2024-11-19 04:30:10 +01:00
get rid of example.png image name check
This commit is contained in:
parent
a19cd53c8a
commit
af843a24c6
@ -9,9 +9,7 @@ export function useImagePaste(onImagePaste) {
|
||||
e.preventDefault();
|
||||
const blob = items[i].getAsFile();
|
||||
const fileName =
|
||||
blob.name !== "image.png"
|
||||
? blob.name
|
||||
: `pasted-image.${blob.type.split("/")[1]}`;
|
||||
blob.name || `pasted-image.${blob.type.split("/")[1]}`;
|
||||
const file = new File([blob], fileName, { type: blob.type });
|
||||
onImagePaste(file);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user