Hi Every one,
I am trying to upload media files using node.js wth formodable and stream 
them through to Azure Blob Service. Here is what my code looks like.

exports.UploadStream = function (req, res) {

    logger.debug(100, 'Upload Stream');
    logger.debug(100, req.headers);

    var contentLength = req.headers['content-length'];
    var form = new formidable.IncomingForm();

    form.parse(req);

    //Get the File Chunk by hooking into data events.
    form.onPart = function (part) {
        part.on('data', function (chunk) {
            logger.debug(100, chunk);
            var blobService = azure.createBlobService('XXXXXXX', ' 
XXXXXXXXX');
            blobService.createBlockBlobFromStream
            (
                'test',
                'testing.mp4',
                new ReadableStreamBuffer(chunk),
                contentLength,
                {contentTypeHeader: 'video/mp4'},
                function (error) {
                    if (!error)
                        logger.debug(100, 'OK');
                    else
                        logger.debug(100, error);
                }

            )

        });
    }

    res.end('returning');
};

I am using ReadableStreamBuffer from  ReadStreamBuffer 
LINK<http://oakleafblog.blogspot.com/2012/12/windows-azure-and-cloud-computing-posts_13.html>
Node Version 0.10.12

I am continuously getting this error :

{ [Error: read ECONNRESET] code: 'ECONNRESET', errno: 'ECONNRESET', 
syscall: 'read' }
{ [Error: read ECONNRESET] code: 'ECONNRESET', errno: 'ECONNRESET', 
syscall: 'read' }
{ [Error: read ECONNRESET] code: 'ECONNRESET', errno: 'ECONNRESET', 
syscall: 'read' }
{ [Error: read ECONNRESET] code: 'ECONNRESET', errno: 'ECONNRESET', 
syscall: 'read' }
{ [Error: read ECONNRESET] code: 'ECONNRESET', errno: 'ECONNRESET', 
syscall: 'read' }
{ [Error: read ECONNRESET] code: 'ECONNRESET', errno: 'ECONNRESET', 
syscall: 'read' }
{ [Error: read ECONNRESET] code: 'ECONNRESET', errno: 'ECONNRESET', 
syscall: 'read' }


Any idea whats wrong here. What i need to fix ?


-- 
-- 
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