玩蛇网提供最新Python编程技术信息以及Python资源下载!

Python web post方法获取ios客户端上传图片吗

请问我怎么获取ios客户端上传的图片呢,用的是web.py的POST方法

 def POST(self):
        user_data = web.input()
        user_name = user_data.get("usrname")
        user_type = user_data.get("type")
        x = web.input(pic={})

或者

    def POST(self):
        user_data = web.input()
        user_name = user_data.get("usrname")
        pic_type = user_data.get("type")
        pic_content = user_data.get("pic")

貌似都不行啊。或者ios客户端该怎么做呢?
我做个html表单测试,第一种方法就能上传图片。

<html><head></head><body>
                    <form method="POST" enctype="multipart/form-data" action="">
                    <input type="file" name="pic" />
                    <br/>
                    <input type="string" name="usrname" />
                    <br/>
                    <input type="string" name="type" />
                    <br/>
                    <input type="submit" />
                    </form>
                    </body></html>

http://stackoverflow.com/questions/15956805/retrieve-http-post-variables-using-multipart-form-data-sent-from-an-ios-device

玩蛇网文章,转载请注明出处和文章网址:https://www.iplaypy.com/wenda/wd19612.html

相关文章 Recommend

玩蛇网Python互助QQ群,欢迎加入-->: 106381465 玩蛇网Python新手群
修订日期:2017年05月18日 - 10时03分47秒 发布自玩蛇网

您现在的位置: 玩蛇网首页 > Python问题解答 > 正文内容
我要分享到:

必知PYTHON教程 Must Know PYTHON Tutorials

必知PYTHON模块 Must Know PYTHON Modules