I cant seem to get to get downloading files working on the new RhoMobile
I tried the public, app and apps folder, but everytime I get an error that says it cant create the file, so it looks like I dont have permission on any of these folders?
It works in the simulator but not on the real device.
Anyone got an example for me that works??
Ps. (I test on an iPhone 5 with iOs 7)
3 Replies
Is that possible to download the file directly to /Libraries/Cache folder????
Hi Jochem,
The userFolder is guaranteed to be writable on all platforms, so can try with it?
Thank you.
Visnupriya R
Kutir Mobility
Even if I use the example from the documentation, it wont work (this uses the userFolder)
---
def download_file
#Download a file to the specified filename.
downloadfileProps = Hash.new
downloadfileProps["url"]='http://www.google.com/images/icons/product/chrome-48.png'
downloadfileProps["filename"] = Rho::Application.publicFolder+"/images/sample.png"
downloadfileProps["overwriteFile"] = true
Rho::Network.downloadFile(downloadfileProps, url_for(:action => :download_file_callback))
end
---
I can try on some other devices soon..