I've had support in BottomFeeder for downloading files via HTTP for quite some time, but it's always involved some hacking. In VW 7.6, it still requires some coding, but - with a hat tip to Martin Kobetic - a lot less hacking. First, you'll want to download this small parcel, which contains one class - DownloadBuildHandler (A subclass of HttpBuildHandler).
Once you have that, all you need is something like this:
'http://www.cincomsmalltalk.com/audio/2008/industry_misinterpretations80.mp3' asURI
envelopeReadStreamDo: [ :stream || target |
target := 'industry_misinterpretations80.mp3' asFilename writeStream binary.
[ DownloadBuildHandler readFrom: stream to: target.
] ensure: [ target close ] ].
Obviously, you might want some more prettiness, like a progress bar, or, at the very least, a "wait while..." dialog. However, that's polish - the basic technique is above, and it's pretty easy.
Technorati Tags:
cincom smalltalk, http