11-22-2017 05:43 PM
I have a rather large file I'm downloading off the internet. It would be nice if I could get a progress bar to show to the user so they could cancel if needed. Also, I'd like to dump the body into a file instead of to memory. Is that possible?
11-23-2017 04:53 PM
Body into file part is easy - just connect "output file" terminal on GET.vi (it's the upper one).
Canceling is a bit more tricky, but you can try to call GET asynchronously and abort the VI (VI is attached to the post):
Now, as of the progress bar: I'd stick with spinner. I don't think there is any sensible method to calculate progress of GET method. Just inform the user that you download something big and show spinner.
11-27-2017 11:09 AM
I need the progress bar because it's a large download and if the user is on horrible internet, I want them to see that they are 1% downloaded and not 99% downloaded so they can exit out wisely. Sounds like it's not possible.
Also, I'm a little bit worried about the abort. That seems like it could cause something to end up in a bad state or memory leaks.