1

Is it possible to perform file I/O operation in Intel XDK using available API or external javascript framework? For example, the app is using jquery.ajax to download the image. Once downloaded, it will save to the app directory.

If no, what is the alternative way to achieve this?

WenHao
  • 1,183
  • 1
  • 15
  • 46

1 Answers1

2

You can use the Cordova File API to do file I/O, upload/download file. Intel XDK supports building using Cordova.

Here is documentation for Cordova File API: http://cordova.apache.org/docs/en/3.3.0/cordova_file_file.md.html#FileTransfer

krisrak
  • 12,882
  • 3
  • 32
  • 46
  • And here are some useful posts to help you understand how to use that API: http://stackoverflow.com/questions/21375624/download-file-to-downloads-folder-ios-android-using-phonegap for some useful info regarding the Cordova `FileTransfer` function and a very good article regarding how the Cordova `File API` in general works: http://www.raymondcamden.com/index.cfm/2012/3/9/PhoneGaps-File-API. – xmnboy May 01 '14 at 23:24