There is such code:

var fileinput = input.get(0); var timestamp = Math.round(+new Date() / 1000); var name = 'screenshot_' + addFile.nextAttachmentId + '_' + timestamp + ext; var blob = clipboardData.items[file].getAsFile(); //clipboardData.items[file] is a DataTransferItem Object blob.name = name; uploadAndAttachFiles([blob], fileinput); 

In Firefox 50.1.0, the line blob.name = name; for some reason, it works incorrectly, assignment does not work, in blob.name the name remains: blob.name instead of the generated name , as a result in the uploadAndAttachFiles([blob], fileinput); the object of such content falls: enter image description here

And in Chrome 55.0.2883 everything works fine: enter image description here

What could be the problem? And where does the name "image.png" come from?

0