3
$\begingroup$

Would it be possible to have some sort of progress indicator for downloading files?

For example if we would like to import: Import["http://lieanalysis.com/exampledata/os.mx"]

It would take a while, it would be nice if you have some sort of progress indicator (like mathematica uses for ExampleData)

$\endgroup$
  • $\begingroup$ @Kuba can't believe i've missed that. Thanks $\endgroup$ – Frank Martin Dec 6 '16 at 13:52
3
$\begingroup$

Use URLSaveAsynchronous to download, then Import the downloaded file. There's an example in the documentation about progress bars.

Be aware that I experienced some problems with this function. In version 11 sometimes it would get stuck after the download has finished. See the discussion:

$\endgroup$
  • $\begingroup$ Thanks for your answer, somehow I must have overlooked this function. Will accept you answer when I'm allowed :) $\endgroup$ – Frank Martin Dec 6 '16 at 13:53
  • $\begingroup$ @FrankMartin Well, there's URLSave, URLFetch, URLFetchAsynchronous, URLSubmit, URLDonwload, URLRead, Import, HTTPRequest and so on and so on. Some are deprecated and won't show up in auto-completion. Not so easy to find the right one. Once again be careful because this kept hanging for me on Windows when wrapped in WaitAsynchronousTask. $\endgroup$ – Szabolcs Dec 6 '16 at 13:56
  • 1
    $\begingroup$ Maybe it is worth mentioning that "Content-Length" header has to be present for progress indicator to show progress correctly. It usually is there but happened to me that it wasn't. $\endgroup$ – Kuba Dec 6 '16 at 13:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.