[Pharo-users] Downloading large files with a progress bar

Offray Vladimir Luna Cárdenas offray.luna at mutabit.com
Thu May 12 18:14:05 EDT 2016


Hi,

I'm using

myUrl asUrl saveContentsToFile: file

to download large files and is working fine. But I would like to add a 
progress bar to show the progress to the user. Previously I used

===============
[: bar |
         bar title: aString.
         [
             "A classical ZnClient download with signalProgress: true;"
         ]
             on: HTTPProgress
             do: [ :progress |
                 progress isEmpty ifFalse: [ bar current: progress 
percentage ].
                 progress resume ].
     ] asJob run.
===============

but I don't know how to signal progress with "saveContentsToFile".

Any hints?

Thanks,

Offray




More information about the Pharo-users mailing list