You may try to fix this by youself - just open firebird.js file in module
directory and move line #157
function Stream(blob){
before line #130
var buf = null;
23 февраля 2012 г. 8:12 пользователь Angelo Chen
<[email protected]>написал:
> hi,
>
> I pipe jpegs from database to browser with following code, if picking
> up only one photo, it works perfect, if more than one, then you can
> see photos are overlapping each other as one, any idea why that
> happens? thanks.
>
> code in route:
>
> exports.get_jpeg = function(req, res){
> dao.loadJpegFromDB(req.params.itemno, function(strm){
> res.writeHead(200, { "Content-Type": "image/jpeg",
> "Content-Length":
> 102400
> });
> strm.resume()
> strm.pipe(res)
> })
>
> code in dao:
>
> exports.loadJpegFromDB = function(itemno, func) {
> var sql = 'select picture from item where itemno = ' +
> itemno.toString()
> var blob = con.querySync(sql).fetchSync("all",false)[0][0];
> func(new fb.Stream(blob))
>
> ejs:
>
> <img src="/get_jpeg/1" height="480px"></img><br/>
> <img src="/get_jpeg/2" height="480px"></img><br/>
> <img src="/get_jpeg/3" height="480px"></img><br/>
>
> --
> 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
>
--
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