From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
01-28-2021 01:55 PM
I am trying to transfer a pdf from a web vi to the server (the server will be running labview web services). The user will select the pdf of interest from their PC to upload to the server. Has anyone had any luck transfering a binary file from a web vi
Solved! Go to Solution.
01-31-2021 09:06 PM
Hi Mike,
Could you try this library/example and see if it works for your use case? There's some discussion regarding this library in this thread.
02-01-2021 01:55 AM
Hi Sujay,
I tried that, it works well with ascii files but I cant get it to work with binary files like pdfs.
Michael
02-01-2021 03:29 AM
I was just looking at the code in the UploadFileToWebVI.js, and it looks like it's returning the file content in the form of text (Line 70). I'm guessing that might be the cause of the issue. One idea I can think of is to return response.blob() instead of response.text().
02-01-2021 04:59 AM
Thanks for the suggestion. I have tried changing to blob from text but unfortunately when I run it the error message I get is "An unhandled error occured on the LabVIEW diagram with code 44306 at <APPEND>"
02-15-2021 05:44 AM
I found a link that shows how to get it working in NXG:
https://github.com/rajsite/webvi-experiments/tree/master/File
02-17-2021 09:14 PM
Hi Mike1979,
I was just cleaning up that example a few days ago to share on here. For future users I posted the example on the NI Example Code forum at the following URL: https://forums.ni.com/t5/Example-Code/File-for-WebVI/ta-p/4129229
That would be a good place to download the library for File handling in WebVIs and to ask questions, etc.
02-18-2021 04:41 AM
Hi Milan
Thanks for that. It looks great!
Michael