Nonsense, I meant, I stay with the latter....

Am 10.02.2013 um 21:38 schrieb Alexander Reichstadt:

> Thanks, I still haven't figured out why but have another routine which 
> manages to actually display the image. In one call I only retrieve the binary 
> data from the database and hardcode the rest, in the other case I actually 
> build the entire image tag with the binary data on the fly and write it to 
> the response object. The latter works, the first doesn't. I stay with the 
> first.
> 
> 
> On Sunday, February 10, 2013 4:54:35 PM UTC+1, mscdex wrote:
> On Feb 10, 9:47 am, Alexander Reichstadt <[email protected]> 
> wrote: 
> > res.write('<img ' + firstItem['generic_params'] + ' src="' + 'data:' + tt + 
> > ';base64,' + xb + '" />','binary'); 
> 
> You don't need to be using the 'binary' encoding here for base64 data. 
> 
> What does `tt` contain in the output? 
> 
> Can you verify that the `xb` Buffer actually contains valid image 
> data? I ask that because if `firstItem['dataval']` is a string, you 
> should be passing in an encoding like 'binary' as the second argument 
> to the Buffer constructor. 
> 
> -- 
> -- 
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: 
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>  
> --- 
> You received this message because you are subscribed to the Google Groups 
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>  
>  

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to