Example Code

File for WebVI

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.


  • LabVIEW NXG Web Module

Code and Documents



A set of libraries to enable file handling with WebVIs. Files in a web browser behave a bit differently than on desktop. In a web browser the user must explicitly select files to be read by the WebVI and the WebVI can trigger files to be downloaded by the web browser. See a demo of the different capabilities.


Supported behaviors:


- Read user-selected binary / text files

- Download binary / text files

- Read pictures from a webcam or from a file

- Base64 Encoding and Decoding VIs


Make sure to include all the Library gcomp's in your application and place them on the Web Server target. The FileTasks.gcomp contains some high-level tasks to handle common operations such as reading a text file as a string, reading a binary file as a byte array, etc.








Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.