Skip to main content
Your application can send a file to the viewer while the stream is running. The file travels over the stream’s own data channel, and the viewer’s browser saves it as a download. No extra server, upload step or frontend code is needed. Common uses:
  • A high-resolution screenshot or render of the current scene.
  • A generated document, such as a quote, a specification sheet or a report.
  • An exported configuration or save file.

Before you start

  • The Pixel Streaming or Pixel Streaming 2 plugin is enabled in your project. Enable only one of them. The node on this page has the same name in both.
  • The viewer is connected and the stream has started. A file sent earlier is not delivered.
  • You know where your application can write files at runtime. See File paths on a streaming server.

How it works

1

Your application calls Send File

You give the node a file on disk, its type and its extension.
2

The plugin sends the file in pieces

The pieces travel over the data channel of the WebRTC connection that carries the stream.
3

The browser puts the file back together

The Streampixel player shows the progress, then saves the file to the viewer’s device.

Node reference

Send File

Sends a file that exists on disk.

Send File as Byte Array

Sends data that is in memory and has not been written to disk. It takes a byte array in place of Filepath, with the same Mime Type and File Extension.

Common types

Send an existing file

Check that the file exists, then send it.
Blueprint: a custom event with a File Path input, File Exists, Branch, Send File with mime type text/plain and extension .txt, and a Print String for a missing file

Send a text file when it exists, and report the path when it does not

1

Create a custom event with a File Path input

One event can then send any file.
2

Check the file with File Exists

Connect the result to a Branch.
3

On True, call Send File

Connect File Path to Filepath. Set Mime Type and File Extension to match the file.
4

On False, report the problem

Print or log the path, so a wrong path is easy to spot while testing.

Send a file your application creates

A file that is still being written cannot be sent. Start the work, wait until the file exists, then send it. This example takes a high-resolution screenshot and sends it to the viewer.
1

Start the capture

Build a unique file path, run the HighResShot console command with that path, and start a looping timer that checks for the file.
Blueprint: DoCapture checks and sets a Busy flag, builds Shot Path from a directory, a random number and .png, runs HighResShot through Execute Console Command, and starts a looping timer

Build the path, run HighResShot, and start the timer

The Busy flag stops a second capture from starting while one is in progress. A random number in the file name keeps two captures from writing to the same file.
2

Wait for the file, then send it

Each time the timer fires, count the attempt and check File Exists.
  • The file exists: clear the timer, wait about a second so the write finishes, then call Send File with image/png and .png.
  • The file does not exist yet: let the timer fire again.
  • Too many attempts: clear the timer and reset Busy, so the application never waits for ever.
Blueprint: WaitForFile increments Attempts, checks File Exists, clears the timer, delays one second, calls Send File with image/png, and on more than 40 attempts clears the timer and resets Busy

Poll for the file, send it, and stop after 40 attempts

What the viewer sees

On the Streampixel player, including when it is embedded in an iframe: The saved file is named capture-<date>-<time> followed by your extension, for example capture-20261116-143005.png. Pixel Streaming sends the type and the extension of a file, not its name.

File paths on a streaming server

On Streampixel your application runs on a streaming server, not on your computer.
A fixed path such as D:/MyProject/Exports/file.txt exists only on your own machine. Build paths at runtime from Get Project Saved Directory or Get Project Directory, so they are valid on any server.
  • Files are temporary. A file your application writes on a streaming server is not kept between sessions and is not available on other servers.
  • Sessions move between servers. The next session may run on a different server.
  • Persistent data belongs in your own storage. Send it to your backend or to cloud storage, keyed by your own user or account ID.

Limits and performance

  • Files share the connection with the stream and are sent in small pieces. Screenshots and documents arrive within moments.
  • A large file takes longer and competes with the video for bandwidth while it is being sent. For large files, give the viewer a link to download from your own storage.
  • Send one file at a time. Wait for a transfer to finish before starting the next.

Troubleshooting

Check these in order:
  1. The path. Print the path and the result of File Exists before calling Send File. A path that works on your computer may not exist on the streaming server.
  2. The timing. The viewer must be connected and the stream started before the file is sent.
  3. The file is complete. If your application has just created the file, wait until it has finished writing. See Send a file your application creates.
It was sent while it was still being written. Wait for the file to exist, then add a short delay before Send File.
Set Mime Type and File Extension to match the file, and include the dot in the extension.
This is expected. The viewer’s file is named capture-<date>-<time> with your extension, because Pixel Streaming does not send a file name.
This is expected. The viewer taps Save on the card to store the file.
The usual cause is a path that exists only on your computer. Build the path at runtime, and make sure the build is packaged with the content your application reads.

Next steps

Unreal side - sending and receiving JSON

Send values and status messages that are not files.

Screenshots

Capture the current video frame with one message, without a file.