I want to process image in job. But when I pass req.file into job buffer is transformed from
buffer:
<Buffer 89 50 4e 47 0d 0a 1a 0a 00 00 00 0d 49 48 44 52 00 00 04 ef 00 00 03 ce 08 02 00 00 00 d8 d3 ab 62 00 00 00 03 73 42 49 54 08 08 08 db e1 4f e0 00 00 ... 764163 more bytes>
to
buffer:
{ type: 'Buffer',
data:
[ 137,
80,
78,
71,
13...
...
What is the way to pass image into the job?
the data is serialized using JSON.stringify and deserialized using JSON.parse, so that is why you are getting the result you are getting.
Is this a bad decision to pass buffer? After all I decided to first save file, and then just pass path.