Javascript Application Octet Stream
The file is downloaded but badly in a wrong encoding! When i dowload the data in the servlet to a file its different to the file saved via your script. @Wilt if the client wants to save it, then it doesn't matter what headers are sent (you can 'save' or 'save link as' on anything in your browser), as the headers are information, not rules so attachment could be considered 'best not to display this yourself' while inline as 'best to display this yourself if you can'. Either way, most browsers will use the filename value as the suggested name.
I have tried using canvas.toDataUrl
and canvas.toBlob
to get an base64 encoded string of an image (screenshot).
Huion tablet drivers. Follow the available link location URL below to get your Huion H610 Pro Driver Windows 10 for free. Huion H610 Pro Driver Windows 10:Download now the latest Windows 10 to connect your tablet with your OS. This is the best and the easiest solution will create the opportunity to connect your Huion H610 Pro with Windows 10 easily.Download the updated Huion H610 Pro Driver Windows 10 from this page to connect your device without facing difficulties. To install the compatible driver on your Windows 10.
In both toDataUrl
and toBlob
, you can set the mime type as image/jpeg
, image/png
and image/webp
, but can you set it to none, or application/octet-stream
?
ex.
Whenever I try to do that, it just encodes it with image/png
mime type.
If it's not possible, how can I get a base64 encoded string of an image with application/octet-stream
mime type?
1 Answer
The mime-type you pass in these function is a hint for the browser as to which encoder they should use to generate an image file.
application/octet-stream
doesn't correspond to any image encoder and is thus not supported by any browser.