开发者

How do securely download a file in Appcelerator?

I'm building an iPad app using Appcelerator and I need to securely download an XML file from a web server. What's the best method for doing this?

I've considered using FTP, but there is no FTP support in Appcelerator, so I would essentially have 开发者_Go百科to start from scratch. Could I use TLS? Am I way off track all together?

Thanks!


this is how I do it.

1] In the Kitchen Sink code check out Platform > XHR > File Download and you can download a remote file. I would suggest accessing that file over HTTPS for a secure connection.

2] If you want to make sure that not anyone can get to it you'll want to do some authentication. You can use HTTP auth... here is an example: http://developer.appcelerator.com/question/20951/how-to-do-a-http-put-with-http-basic-authentication - At your application side of things you'll want to set this up to require some authentication.

Hope that helps... it will get you the file over a secure connection and require a login / password to acquire the file.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜