send icon indicating copy to clipboard operation
send copied to clipboard

Add support for transform option.

Open TimBarham opened this issue 10 years ago • 9 comments

This is based on PR #69 by @peterbartels (see issue #71), but with conflicts resolved (and some typos in README.md fixed).

Adds a transform option, which allows the file stream to be transformed before piping it to res.

TimBarham avatar Sep 29 '15 18:09 TimBarham

Awesome!

dougwilson avatar Sep 29 '15 18:09 dougwilson

Switched to an older version of replacestream. Node.js 0.8 is happy now :)

TimBarham avatar Sep 29 '15 20:09 TimBarham

Gotcha. I would much rather not use some ancient version, because that makes it hard for us to support new versions of Node.js. Can you find a module that is current? Otherwise, I mean, just write a transform stream in the test, because it's pretty simple.

dougwilson avatar Sep 29 '15 20:09 dougwilson

Basically, just like any module, we always keep our dependencies up-to-date (they are slightly out of date right now, only because we haven't made a commit since those modules released new versions). If we find one of our dependencies no longer work with Node.js 0.8, for example, we replace it with something else that does. If we were to accept the PR as-is it would mean we would right away have a task to figure out what to replace the module with. Ideally, we don't really want to accept PRs that immediately put work on us, I'm sure you'll understand :)

dougwilson avatar Sep 29 '15 20:09 dougwilson

Heh, no problem - I totally understand. I was just taking the easy way out by using the tests from the PR this was based on :smile:. I have an update that I'll push once it is cleaned up that uses a simple, inline replacement for replacestream.

TimBarham avatar Sep 29 '15 21:09 TimBarham

Updated to use latest readable-stream and a trivial replaceStream implementation.

TimBarham avatar Sep 29 '15 22:09 TimBarham

:+1:

douglasduteil avatar Nov 11 '15 15:11 douglasduteil

This is a cool feature! Is there any plan to integrate it soon to master? Thanks!

albertinad avatar Jul 12 '16 14:07 albertinad

@dougwilson - are there any plans to take this change? I'm happy to do the work to resolve the conflicts that have arisen after 10 months of sitting stagnant, but only if there is a point.

TimBarham avatar Jul 15 '16 03:07 TimBarham

I am going to take some liberty here and close this in favor of the much more deeply discussed https://github.com/pillarjs/send/pull/195 so that we can consolidate any conversation going forward. We are not going to try and land this feature soon, as we are focusing on the v5 push for express and this is not a breaking change, but I dont want to leave too many open PRs which are unlikely to see progress, especially when they are duplicates in many ways.

wesleytodd avatar May 17 '24 23:05 wesleytodd