Receive a file from the viewer's device on the streaming machine

On Eagle 3D Streaming, your Unreal app can ask the viewer for a file from their own device: the browser's file picker opens, the viewer chooses a file, and it is written onto the streaming machine where your app reads it as an ordinary file.

The direction here is viewer's device → streaming machine. For the other way, see send a file to the viewer's device.

With the plugin

  1. Call E3DS Transfer File From User Browser To Unreal and give it a destination inside the project — for example ProjectDirectory/Saved/.

    The node that transfers a file from the viewer's browser to Unreal
  2. The viewer picks a file in the dialog the platform opens.

    The browser file selection dialog during upload

Knowing when the file has arrived

Transferring the file is not instant, so the platform reports progress as messages your app can listen for.

MessageMeans
onUserSideFileSelectedThe viewer picked a file. The transfer has started.
onUserSideProcessingProgressUpdateSent repeatedly while the browser is sending the file, with filename and progress. Treat it as a sign of activity: progress does not currently arrive as a usable percentage.
onUserSideFileProcessingFinishedThe browser has finished sending it.
onUploadedFileAvailableThe file is now on the streaming machine, in your project directory. This is the one that means success.
onUserSideFileSelectionCanceledThe viewer opened the dialog and closed it without choosing.

Each carries the filename, except the cancellation. Together they give you the three states worth tracking: in progress, finished, abandoned.

A failed transfer sends nothing to your app — no message says it failed. If onUploadedFileAvailable has not arrived within a time that fits your file sizes, treat the transfer as failed.

Handle the cancellation, not just the success

A common pattern is a timer that polls for the file with File Exists until it appears. That works — until somebody closes the dialog, and the timer waits forever for a file that will never arrive. onUserSideFileSelectionCanceled is what stops it.

Using File Exists to check whether an upload has completed
Polling with File Exists: "No" until the file lands, then "Yes".

Without the plugin

Send this with Send Pixel Streaming Response:

{"cmd": "sendLocalFileToUE4", "pathToSaveFile": "C:/0.apps/YourCompany/YourApp/3/YourApp/Saved/"}

The path above is an example of what your app sends; never type it, it differs on every streaming machine. Build pathToSaveFile at run time as an absolute path: Get Project Directory (or Get Project Saved Directory) → Convert Relative Path To Full, and end it with / — for example the full project directory + Saved/, as in the screenshot below. The file name is appended to it with no separator, so without the trailing / the file lands next to the folder with the folder's name stuck to the front. A relative path is resolved against the streaming system's own folder, not your project.

Sending the upload command manually

Last updated