Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7511109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T23:26:56+00:00 2026-05-29T23:26:56+00:00

I would like to send a Windows Azure Blob (an image) directly to the

  • 0

I would like to send a Windows Azure Blob (an image) directly to the client ; I am trying this :

    blobService.getBlobToStream('images', req.url, res, function(err, blob) {
    if (!err) {
        res.writeHead(200, { 'Content-Type': blob.contentType });
    } else {
        res.writeHead(200, { 'Content-Type': 'text/plain' });
        res.end(err);
    }
});

I am trying to pipe the Blob stream directly to the response stream ; should this work ? In Firefox, I get a message : “The image cannot be displayed because it contains errors”. Looking at Firebug, the size of the image is 0.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-29T23:26:57+00:00Added an answer on May 29, 2026 at 11:26 pm

    This seems to work prefectly for me (if this is any help?):

    var azure = require('azure');
    var http = require('http');
    http.createServer(function (req, res) {
        var blobService = azure.createBlobService("xxx", "yyy", "blob.core.windows.net").withFilter(new azure.ExponentialRetryPolicyFilter());
        blobService.getBlobToStream('container', 'image.png', res, function(error){
            if(!error){
                res.writeHead(200, {'Content-Type': 'image/png'});
                res.end();
            }
            else
            {
                console.log('error');
                console.log(error);
                res.end();
            }
        });
    }).listen(8080, "127.0.0.1");
    

    Update

    Just figured it out. req.url will have a leading slash (/). Which I’m guessing will not match your image filename.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would like to send a windows service program to our client that does
I would like to send a html string with a GET request like this
I would like to send a struct from my client program to a server
On Windows XP, we would like an application to be able to send UDP
I would like to send mail from a script on a Windows Server 2003
I have a window which is hidden and I would like to send a
I would like to send and receive OpenSoundControl in an AIR application, on the
I would like to send a list of Appointment s through WCF. My Interface
I would like to send out an update of my apk, but i did
I'm using a Rails application and would like to send/receive text messages through my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.