How to serialize a file in JavaScript?

I want to implement asynchronous file download for my asp.net application. My idea is to serialize the file on the client side of JSON and call the web service to restore the file server side. My question is:

How to read a file as binary and serialize it in JSON? The solution cannot require the use of Google Gears or the “mandatory installation” of client technologies. Thank!

+3
source share
5 answers

Use iframe to hide the file upload process. You do not want to process the data in JavaScript, as it will be very slow. All you have to do is manage user interactions.

: http://www.webtoolkit.info/ajax-file-upload.html

+7

Javascript, , , - Flash ActiveX.

+4

Javascript, .

, , , , - - %USERPROFILE%\ntuser.dat.


AJAX, IFRAME; . .

+1

, JSON . , , . . (iframes).

0

, . , , - javascript ( ), , , ( asynch uploads ..).

, , .

,

  • ?
  • ?
  • ?
  • ?
0

Source: https://habr.com/ru/post/1728228/


All Articles