LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NXG : How to read/upload a file in a webVI ?

Solved!
Go to solution

Thanks a lot Frank for your new details about the opportunity to use js features as you reported in the links.

If you will work for this feature at the same time I believe that will be a good work

 

Tiziana

0 Kudos
Message 11 of 20
(3,757 Views)

Hi pirulla72,

 

I added a way to download an array as a CSV file to the library. Please test it out and let me know what you think. 

 

I also created a repo on GitHub for the example as well. Please see below: 

https://github.com/doczhivago/DownloadUploadAFileWebVI

 

Thanks,

Frank

Message 12 of 20
(3,736 Views)

Hi Frank,

 

thanks a lot for your new functions!

This is a big improvement and I already try the upload project and it works. 

I think I'll add it in my project in order to save some file into web server folder

 

Good work man!

 

Have a nice day

Tiziana

Message 13 of 20
(3,719 Views)

Frank,

Thanks for the demonstration of uploading a file. I have another question which you may be able to help with.  I have html5 code that can access a cell phone camera, but I cannot figure out how to transfer the image from the camera up to the server.  Is this something that makes sense?  I have tried to add it into the html tag editor but I am confused by where it is supposed to go?  Does the html that I include go inside the control for the html URL.

Appreciate any help or direction.

0 Kudos
Message 14 of 20
(3,575 Views)

Hello! I have tried to upload a binary file this way. Just converted the string output to U8 array. Values become corrupted in some cases. Probably body.text() js method converts somehow string that contains non-UTF8 characters. Could you advise what can be done in this case?

0 Kudos
Message 15 of 20
(3,542 Views)

Hi ADLADL,

 

Would you create a new forum post for this question?

 

I think that you want to download an image from your WebVI to your server machine, correct? To do that, you can modify the JavaScript Library Interface component according. See below for an example and the component in the LabVIEW NXG project:

 

Example

https://eligrey.com/demos/FileSaver.js/

 

https://github.com/doczhivago/DownloadUploadAFileWebVI/tree/master/Upload%20A%20File/Download%20Uplo...

 

Thanks,

Frank

0 Kudos
Message 16 of 20
(3,527 Views)

Hi izWERg,

 

Do you have an example file that you can share? Would you mind posting an issue on the GitHub page please?

https://github.com/doczhivago/DownloadUploadAFileWebVI/issues

 

Thanks,
Frank

0 Kudos
Message 17 of 20
(3,525 Views)

Hi Frank!

 

Here is the file that is upladed incorrectly. I've posted a new issue on the GitHub.

Thank you.

Message 18 of 20
(3,511 Views)

For future readers I have put together the File for WebVI library.

It supports text / binary file open and download in addition to some advanced features like capturing images from a webcam, fast base64 encoding, etc.


Milan
Message 19 of 20
(3,226 Views)

I am interested in using the upload a image file in a webVI. I have downloaded the libraries. Can you please send me the example code for the demo. Thank you

0 Kudos
Message 20 of 20
(3,031 Views)