Closed fjeglinski closed 3 years ago
Please create a repro repo.
this is my repl =) reference: https://github.com/moleculerjs/moleculer-web/issues/188
this is my repl =) reference: #188
Yes! Basically we have the same problem :D
I unfortunately did not solve this problem completely, but refused to use stream in my project.
You need to think about the design of the moleculer and work with parameters in streams, there is some separation that is not obvious when working.
That is a pity.
We found a workaround by using the request directly and sending the file data via broker.call
from ApiGateway
to the particular service which processed file data. It is not a masterpiece ... but it is working.
Maybe I am wrong and maybe I understand the documentation not correctly but it should work the way we both tried isn´t?
@fjeglinski yes, there is an unobvious action in which we lose access to the parameters.
Hi there,
currently we have a problem with file streaming when we using a NATS server for service communication. When we set up the application on our local machine everything works as expected.
The problem is that while using NATS the $params object is empty, although we defined this param as part of an alias. Like described here: https://moleculer.services/docs/0.14/moleculer-web.html#File-upload-aliases
And due to the empty $params object the validation for the stream receiving function fails.
The call of
is correct because the code is invoked correctly on localhost.
This is our API Gate Way Code:
And this is the corresponding
addFile
Action:Every help is appreciated =). Thanks guys!