Download files using javascript and webservices
I need to download a list of files from an html page inside a public portal. Files are in folders in an intranet server.
From the html page, using javascript I call an asp.net webservice that reads a file, and sends its content as开发者_如何学Python a byte array.
How can I download/show that file using that byte array from the javascript function?
Thanks, Fabio
It isn't going to work exactly as you describe it. You can't save a byte array to a file from javascript.
What you can do is to link to a "service" that returns the file as its response with the proper headers to cause the browser to open a save dialog.
精彩评论