Closed leviwheatcroft closed 6 years ago
I thought, this is a paste of pictures from the clipboard, which is only a temporary file flow. Do not have a file name in this form?
I understand what you're saying, but how do other js apps get filenames from pasted images ?
you can get file name like this but copied images from browser and so doesn't have a name
$('textarea').one('pasteImage', function (ev, data) {
var fileName = data.name;
}).on('pasteImageError', function (ev, data) {
throw "error on pasting image";
})
I eventually realised that the "other js apps" I was thinking of (like slack.com) don't get a filename when, as others have said, there is no "file" to have a name. Instead, they just make up a name like "Image.jpg"
Is there any way to get the pasted image's filename ?
Seems like there must be some way to do this, as I've seen apps like slack show an image's filename when pasted.
I thought it might be in the image's exif data, but that doesn't seem to be the case.