On my case I have a ByteArray returned from a AMF call to the server, so it's not UI/MXML. On my Flex/AIR application I convert this ByteArray on a temporary file and open it. Here I want to do the same (if I can avoid to create a temporary file on the middle, would be a better way). A AS util function that I can reuse and encapsulates the JS code, perhaps the best approach ?
Carlos Rovira <carlosrov...@apache.org> escreveu no dia quinta, 10/09/2020 à(s) 11:12: > Hi, > > Since Royale is about encapsulating code that works through platforms (and > in JS cross browser), I think it would be good to have a bead for that at > Core or Basic level. > > just my 2... > > El jue., 10 sept. 2020 a las 11:45, Harbs (<harbs.li...@gmail.com>) > escribió: > > > There is also a FileReference implementation in the mx package. > > mx has a DownloadButton which does what you want. > > > > You also might want to know about URLUtils. > > > > HTH, > > Harbs > > > > > On Sep 10, 2020, at 12:33 PM, Hugo Ferreira <hferreira...@gmail.com> > > wrote: > > > > > > Sometimes it easy to forget that Royale at the end of the day IS JS :) > > > > > > Piotr Zarzycki <piotrzarzyck...@gmail.com> escreveu no dia quinta, > > > 10/09/2020 à(s) 05:53: > > > > > >> Hi Hugo, > > >> > > >> I will just shot you with the tip - How would you do that in pure JS ? > > - I > > >> think this maybe your answer ;) > > >> > > >> Thanks, > > >> Piotr > > >> > > >> czw., 10 wrz 2020 o 01:59 Hugo Ferreira <hferreira...@gmail.com> > > >> napisał(a): > > >> > > >>> I have a ByteArray to comes from the server side. > > >>> I would like to open now the file. > > >>> With Flex (AIR), I use FileStream. > > >>> What's the equivalent here. > > >>> I would like to open the file. > > >>> If not possible (for security reasons since we are on web space), at > > >> least > > >>> download the file, so the user can click on it. > > >>> > > >>> What is the Royale approach/code, for that ? > > >>> > > >> > > >> > > >> -- > > >> > > >> Piotr Zarzycki > > >> > > > > > > -- > Carlos Rovira > http://about.me/carlosrovira >