Login | Register
SlimerDude 25 Jul 2012
(`fan://wotever/res/wotever.bin`.get as File).in
* Fingers Crossed it's possible *
andy 25 Jul 2012
You have have to manually handle that yourself. Images work because all we do is set the <img src=xxx/> and the browser handles requesting the resource.
In your case - you will have to open up a HttpReq yourself to fetch the data. Also keep in mind the response is asynchronous - so won't block while waiting for request to finish.
There are a couple of various tweaks out there, e.g. This jQuery Binary Ajax downloads a binary file as a String, and jDataView: Read Binary File then acts like a sys::Buf. But it seems a little overkill, and complex to merge into Fantom.
The HTML 5 File API looks promising but is geared towards local files... and is HTML 5.
Login or Register to Reply
Back | All Topics
Collapse All Expand All