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 7191107
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T19:39:33+00:00 2026-05-28T19:39:33+00:00

In my node.js app I’m uploading a file (which is saved to local filesystem

  • 0

In my node.js app I’m uploading a file (which is saved to local filesystem -> /tmp/) from which I create a Stream of, to store that file into my S3bucket using aws2js (Amazon CLI bindings).The problem starts with trying to initially save the file to S3 with putStream(…), before I do any further manipulations. (using ´putFile(filepath)´ works!)

The Entry in my Bucket is created and no error is given with the callback. But no file-content has been saved and the Entry has 0 bytes.

Following, my code;

....
var fileStream=fs.createReadStream(file.path),
    savePath = _makeSavePath( file.name );                  

s3.putStream(savePath, fileStream, 'public-read', {'content-type': file.type.mime, 'content-length':file.length}, function (err, s3File) {
    if (err){
        console.error(err);
        fileGetCB(err);
        return;
    }
    console.log("SAVED TO S3 '"+savePath+"'!!");

    //do further manipulations with fileStream
});
...

I can assure, that file is initialized and that the file at file.path exists.

The reason why I’m using a stream and not using S3.putFile(path) is because I’ll be further manipulating the file. By using a stream I could later reuse so that not every module has to re-read the whole file (maybe its not even possible to ‘reuse’ a stream, but thats not the problem (yet).. )

I am very helpful for any hand in any direction, since I cant figure out why this isn’t working for 4days of try&fail. Thank you!

  • 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-28T19:39:35+00:00Added an answer on May 28, 2026 at 7:39 pm

    Actually, I made a mistake in my original post on GitHub. aws2js changed internally the way that a Stream is uploaded to S3.

    As for node.js v0.6.9, it isn’t unstable per se, but it has a broken handling of Expect: 100-continue.

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

Sidebar

Related Questions

I've got an ASP.Net app in which my AppSettings node from the Web.Config xml
I've coded an node.js app that when get executed need to return CWD from
I have a basic Node.js app that I am trying to get off the
I'm working on a node app and looking to deploy on Joyent, which I'm
We have a node.js app that uses node_msyql , a great little library for
I have a Rails app that sends requests to a Node.js app. The node.js
So I'm making a rails app that also utilizes node.js for realtime features. What
I'm creating an app that uses Rails to serve webpages and node.js/socket.io to facilitate
i'm trying to write a simple app with node.js to pull some json from
I'm building my node.js app which has the following structure: server.js controllers/user.js server.js require

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.