> Markdown version of [StreamReceiver](https://vaadin.com/docs/v10/flow/advanced/tutorial-stream-resources). Section index: [llms.txt](https://vaadin.com/docs/v10/flow/llms.txt)

# StreamReceiver for receiving incoming data stream

To receive upload from the client we need to register a `StreamReceiver` that will get a URL that will handle receiving of an upload stream.

For creating a StreamReceiver we first need to create a `StreamVariable` that handles terminal Upload monitors and controls the upload during the time it is being streamed.

Then the stream can be registered through the Element API.

```java
StreamReceiver streamReceiver = new StreamReceiver(
    getElement().getNode(), "upload", getStreamVariable());
getElement().setAttribute("target", streamReceiver);
```
