Search Results

Search found 4 results on 1 pages for 'imgen'.

Page 1/1 | 1 

  • (closed) nodejs responding an image (via pipe and response.end()) leads into strange behaviour

    - by johannesboyne
    What the Problem was: I had 2 different writeStreams! If WriteStram#1 is closed, the second should be closed too and then it all should be piped... BUT node is asynchronious so while one has been closed, the other one hasn't. Even the stream.end() was called... well you always should wait for the close event! thx guys for your help! I am at my wit's end. I used this code to pipe an image to my clients: req.pipe(fs.createReadStream(__dirname+'/imgen/cached_images/' + link).pipe(res)) it does work but sometimes the image is not transferred completely. But no error is thrown neither on client side (browser) nor on server side (node.js). My second try was var img = fs.readFileSync(__dirname+'/imgen/cached_images/' + link); res.writeHead(200, { 'Content-Type' : 'image/png' }); res.end(img, 'binary'); but it leads to the same strange behaviour... Does anyone got a clue for me? Regards! (abstracted code...) var http = require('http'); http.createServer(function (req, res) { Imgen.generateNew( 'virtualtwins/www_leonardocampus_de/overview/28', 'www.leonardocampus.de', 'overview', '28', null, [], [], function (link) { fs.stat(__dirname+'/imgen/cached_images/' + link, function(err, file_info) { if (err) { console.log('err', err); } console.log('file info', file_info.size); res.writeHead(200, 'image/png'); fs.createReadStream(__dirname+'/imgen/cached_images/' + link).pipe(res); }); } ); }).listen(13337, '127.0.0.1'); Imgen.generateNew just creates a new file, saves it to the disk and gives back the path (link)

    Read the article

  • Windows 8 mail app unable to pick contact

    - by imgen
    I'm using Windows 8 x64 RTM, but when I open the mail app and compose an email, then pick contact using the "+" button: I'm greeted with an error message from people hub: This app uses email addresses and none of your contacts have any. Open the People app to add this info to your contacts. However I do have contacts that have email addresses: How do I properly connect the People app to the Windows Mail App?

    Read the article

  • Windows 8 delete key always delete file permanently

    - by imgen
    Don't know why, but now my Delete key works the same as Shift + Delete which shows a 'Do you want to delete XXX permanently dialog. And it does not go through Recycle Bin anymore. How so? I am using the Windows 8 x64 edition. Update: My recycle bin setting is fine, that's why this is tricky. But the "Display delete confirmation dialog" check is checked and grayed out. That's one bit that is. The radio button of "Don't move files to recycle bin" is not checked.

    Read the article

1