To download NI software, including the products shown below, visit ni.com/downloads.
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 as well as helpers to make data urls
- Capture image snapshots of elements on the page such as controls as a file (Note: Safari may only have partial support)
- HTTPExtensions to support POST Multipart and GET file responses (Requires G Web Development Software 2022 Q3 or later)
- SystemLinkFileExtensions to support the SystemLink File API (Requires G Web Development Software 2022 Q3 or later)
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.
(Note: Safari may only have partial support for snapshots)
Extensions for the HTTP VIs (requires G Web Development Software 2022 Q3 or later):
Extensions for SystemLink File VIs (requires G Web Development Software 2022 Q3 or later):
Release 8 - Breaking Change: HTTPExtensions library now supports the HTTP Client handle. Requires G Web Development Software 2022 Q3 or later. Added File Transfer Extensions palette to support the SystemLink File services.
Release 7 - Add HTTPExtensions library with the Post Multipart Ex - String VI to enable HTTP Post messages of type multipart/form-data to HTTP servers.
Release 6 - Snapshot bugfix to support more control types, specifically a Tab containing a Graph and legends.
Release 5 - Modified snapshot Safari disclaimer. Snapshot seems to have at least partial support in the latest Safari.
Release 4 - Enable support for snapshots using the Get Image VI
Release 3 - Support for G Web Development Software 2021
Release 2 - Enable support for Base 64 Decoding large strings and add Create Data URL VI
Release 1 - Initial release
Description-Separate-2
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.
Thanks for providing these samples, MilanR!
Any chance these would be available for NXG 4.0 as well?
This version of the library is heavily dependent on the JavaScript References feature made available starting in NXG 5. It's recommended to use G Web Development Software 2021 if possible.
Thanks for providing these samples, MilanR!
Luc Desruelle | Mon profil | Mon blog LabVIEW | Auteur livre LabVIEW : Programmation et applications - G Web
Certified LabVIEW Architect (CLA) & Certified TestStand Developper (CTD) | LabVIEW Champion
MESULOG - LinkedIn site | NERYS - NERYS Group
| directeur CEO MESULOG
| CODIR - NERYS group
Hi MilanR,
Nice work! Any chance to publish a version which works with the actual Community Version of NXG5.1...? If i try to use your release 5 i get the failure message that NXG version is newer from your files. There is actually no update of the NXG5.1 Community to your version...?!
Thanks and best regards,
Ulf
Hi Ulf,
Starting with release 3 this project switched to G Web Development Software which is a standalone version of the LabVIEW NXG Web Module.
G Web Development Software does have a community version as well and it includes a tool to migrate projects from LabVIEW NXG Web Module.
I'd encourage switching to G Web Development Software if you would like to use releases >= 3 of this example.