How do I upload files using http/ftp to iphone/ipa

2019-03-27 07:07发布

Is there any good advice on uploading files to the device? I've seen many apps create a http server on 80 or 8080 to upload files. Does that mean I have to implement a server too?

Are there any 3rd-party libraries? (Preferably open-source and non-GPL)

EDIT: I am going to upgrade files in the app for specific devices in a corporate environment, so the ipad pulling files from a central server is also an alternative. But I would have to send messages to these ipads to tell them to fetch those files.

7条回答
Rolldiameter
2楼-- · 2019-03-27 07:47

The Python CGIHTTPServer allows you to create a server in 0 lines of code:


jcomeau@intrepid:~/rentacoder/bin2txt$ python -m CGIHTTPServer
Serving HTTP on 0.0.0.0 port 8000 ...

Actually implementing a script to parse the input and save the file would take a little more effort.

[later] OK, so forget about that, Apple doesn't allow it. See Local server on iPad for the iPad at least.

查看更多
登录 后发表回答