Using the crypto module from node. When the string is converted to a buffer with encoding utf8 , the hashes are identical. I assume this means that axios implicitly encodes the blob in a utf8 string? When requesting an arraybuffer , the response. It has a different hash than the blob. Encoding this buffer as a utf8 string leads to a visibly different string.
To Reproduce Here is my code to reproduce the issue. I'm hosting a small zipped folder on localhost with npm serve. Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name.
Email Required, but never shown. The Overflow Blog. Who owns this outage? Building intelligent escalation chains for modern SRE. Podcast Who is building clouds for the independent developer? Featured on Meta. Now live: A fully responsive profile. Reducing the weight of our footer. That was it! To correctly receive a pdf from the server, I had to use responseType: 'arraybuffer' in the config field of the httpService call.
Thank you! Sign up or log in Sign up using Google. Sign up using Facebook. Sign up using Email and Password. Post as a guest Name. Email Required, but never shown.
The Overflow Blog. Who owns this outage? Building intelligent escalation chains for modern SRE. Podcast Who is building clouds for the independent developer? Featured on Meta. Now live: A fully responsive profile. Reducing the weight of our footer. Linked Vue Show sub menu. Vue Answers. Vue 3 Show sub menu. Vue 3 Testing. Vue 3 Projects. Vue Testing. NativeScript Vue. Vue and D3. Top Vue Packages.
Vue Ionic. Ant Design Vue. Chakra UI Vue. Nodejs Show sub menu. Angular Show sub menu. Angular Material. TypeScript Show sub menu. TypeScript Best Practices.
Modern JavaScript. JavaScript Mistakes. JavaScript APIs. Python Show sub menu. Python Answers. Beautiful Soup. Careers Show sub menu. Practice Project Ideas. Reviews Show sub menu. Useful APIs. Books Show sub menu.
0コメント