Check out  "inconsistency of base64 encoding on http.get responses"  
@ https://github.com/joyent/node/issues/3026



On Thursday, April 5, 2012 7:57:30 PM UTC-4, Mehdi Avdi wrote:
>
> Hi everyone,
>
> I'm sending the contents of this Flex form (Don't ask why) over to node. 
> There is a post paramteter called "photo" which is a base64 encoded image.
>
> Contents of photo get sent over ok. Problem is when I am trying to decode 
> the content and write them to a file.
>
>   var fs = require("fs");
>
>   fs.writeFile("arghhhh.jpg", new Buffer(request.body.photo, 
> "base64").toString(), function(err) {});
>
> I've tried toString("binary") as well. But it seems node doesnt decode all 
> of the content. It seems it only decodes jpg header info and leaves the 
> rest.
>
> Can anyone please help me with this?
>
> Thanks
>

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

Reply via email to