Downloading files from a server
It's always been possible to utilize XMLHttpRequest to send and receive content from external servers, which means that technically you could dispense with the File Transfer plugin entirely and use XHR, even for large files.
While it is possible, it's not ideal for several reasons. They are as follows:
- You're subject to any cross-origin restrictions, which may mean adding CORS support to the target server
- The data you receive isn't actually stored anywhere; you're still responsible for writing it out to a file
- You'll need to write a good deal of boilerplate code unless you are using an abstraction
The File Transfer plugin, on the other hand, has the following benefits:
- It reads and writes from the native file system without ...