Skip to content

Transformstream in read-write stream pipe #405

@b00tsy

Description

@b00tsy

Is your feature request related to a problem? Please describe.

Although already discussed and closed in #5 I believe it might be worth another thought: eg if you had the requirement to encrypt data, but do not have the enterprise version, it would be quite fancy to do that with a transformstream, eg as described here: http://codewinds.com/blog/2013-08-20-nodejs-transform-streams.html

Describe the solution you'd like

in fromMulterStream enhance this line pump([readStream, writeStream]) to:

let streamArray = [readStream]
if (Array.isArray(streamOptions.streamTransformers) && streamOptions.streamTransformers?.length) {
  streamArray = streamArray.concat(streamOptions.streamTransformers)
}
streamArray = streamArray.concat([writeStream])
pump(streamArray)

Describe alternatives you've considered

Alternative would be as described in #5 to re-read the data transform, it and write it again and then delete the old data.

Additional context

If you think that's worth thinking of I could provide a PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementA viable proposal of a new feature for the module

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions