Add StreamFileParam decorator#47
Conversation
|
Could you help me understand how this is different from the Also, please add some tests. |
|
Hi Nick, sorry for the delay... I just added some unit tests for @FileParam and @StreamFileParam parameters. So, the difference between @FileParam and @StreamFileParam is simple. With @StreamFileParam, nothing is done, and you still have the chance to pipe your request to another Http server in order to process streaming... |
|
@tchambard Hi, did you get your StreamFileParam feature merged into the base typescript-rest project? I was about to implement a similar thing when I stumbled on this pr. |
|
@ngraef I am really interested by this feature. Streams are different from files as they should be consumed (or piped elsewhere) inside rest handler as said by @tchambard . Any news ? |
|
@ngraef I close this PR to reopen a new one in order to rebase correctly my branch with master. It could be really good to merge it as some other people are interrested... |
In order to be able to pipe the request in express handlers implementations (stream) instead of using multer like typescript-rest is doing with FileParam decorator, the new StreamFileParam decorator will generate the correct swagger button for uploading binary file.