All Questions
Tagged with binary-data node.js
35 questions
0
votes
1
answer
79
views
NodeJS Buffer Size Logic: why 8KB as a default and not just the data size?
If you read a file smaller than 8KB in size NodeJS allocates 8 KB for it.
This isn't intuitive or expected, we are getting "more" bytes than we put. But it isn't a bug either at least in the ...
0
votes
0
answers
79
views
How to parse a binary 64-bit double timestamp in node.js
I am working with binary data that is passed btween two diffrent envrionments (Node and Python)
On the first end a stimestamp is packed using python strcut library as a 8-byte double as shown bellow:
...
0
votes
1
answer
3k
views
How can I add an image to Stripe's Checkout Session page as a Buffer / Binary instead of a URL
When I try to create a checkout session without the image, it is working as expected. But When I add the "images: [`data ..." line in the product_data object, I am getting the error: Invalid ...
-1
votes
1
answer
1k
views
store binary data of media(image/video) received from whatsapp cloud API
i have to store binary data of which i received from whatsapp cloud api. i am using node js but unable to send the file data using form data
here is reference i have referred https://developers....
0
votes
0
answers
506
views
send attachment as file from api url that serves binary file nodejs nodemailer
I have a protected url that serves the pdf file and i want to send this pdf file to mail.
This is how I am using the protected url to get binary data
return axios.get(url, {
headers: {
&...
0
votes
1
answer
448
views
How to findById for uuid type ObjectId mongoose nodejs?
My mongo document objectId is of type UUID v4 and want to fetch it using findById.
When I fetch document using findOne({}) it returns document for uuid '2df8dcfa-05fc-4e33-bf98-a3a8684ca76f' and _id ...
0
votes
1
answer
379
views
How to display binary data in <img /> in browser?
Data in mongodb looks like:
avatar:Binary('iVBORw0KGgoAAAANSUhEUgAAAPoEAmpwR42ny9h3db17Xuq//g...', 0)
Data in response using postman looks like:
{
"avatar": {
"type": &...
1
vote
0
answers
1k
views
How do I receive a data buffer (octet stream) on the client side in JavaScript as a file?
I have an endpoint in node/express which does something to this effect
https.get(EXTERNAL_ENDPOINT, response =>
{
const data : ArrayBuffer[] =...
1
vote
1
answer
1k
views
Node.js - Displaying an image saved like a binary data in mongodb, using ejs
I have a struggle with displaying an images, retrieved from mongoDB, where it is saved as a binary data. I'm using Multer for storing images to database. Images are stored into database correctly, but ...
2
votes
0
answers
696
views
Got Binary Data when not Reconstructing a Packet in Android
I exchanged binary data through a socket. I used socket library in
https://github.com/socketio/socket.io-client-java
There is an error when I receive the socket using socket.on. The error is :
got ...
2
votes
0
answers
295
views
Binary file parsing issue with node js with the library binary-parser
I am parsing a binary file in node js using below command. However while parsing i am getting the value as in courseFees is of variable type "PIC S9(09)V99 COMP-3" and paymentTime is of variable type "...
1
vote
1
answer
919
views
how packed decimal stores values. how to write a node js logic for packed decimal of variable type PIC S9(09)V99 COMP-3
I have a variables of type PIC S9(09)V99 COMP-3 and PIC S9(07) COMP-3 in a file. I need to parse it and get the value in node js. Could you please help me understand it with simple examples. Also help ...
0
votes
1
answer
323
views
Unable to convert file to binary format for sending to wit.ai api using node.js
I am facing an issue in converting Audio file to Binary format. I need to send it to Wit.AI api which is expecting the data in that format. I am using node.js. In my front-end I am recording the user ...
0
votes
2
answers
2k
views
How to serve image raw binary data in nodejs
I have an img tag in my html that requests the image from nodejs server. In my server js file I have below code to send image response but I observed data is not rendered on client side. Any ...
3
votes
1
answer
2k
views
What's the fastest way to parse Node.JS buffer stream chunks' binary data into structures?
Googling for "parse nodejs binary stream" I see lots of examples when the emitted data fits neatly into the expected return size, but zero examples of how to handle the case when the next chunk ...