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

# Using StreamReceiver to Receive an Incoming Data Stream

To receive an upload from the client, you need to register a `StreamReceiver` that accepts a URL to handle receiving an upload stream.

To create a `StreamReceiver`, you first need to create a `StreamVariable` that monitors and controls terminal upload during the time it’s 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);
```

`E14BB11E-3462-484B-A2A8-394B842A79DC`
