简体   繁体   English

从照片库获取图像,然后按名称和路径将其上传到Web服务

[英]Get an image from photo library and upload it to web service by name and path

I am creating a web service based iphone application in which a certain place i need to post an image on to the web for which i want to select image from photo gallery of phone and then i need to get the name and the path of the image on textfield and then uploading of the image. 我正在创建一个基于Web服务的iphone应用程序,在该应用程序中,我需要在某个位置上将图像发布到Web上,我想从该图像中从手机的图片库中选择图像,然后我需要获取图像的名称和路径。在文本字段上,然后上传图像。

or when pressing the browse button image picker will show all the image of the iphone and by selecting image it will return its path and name by which we can upload it. 或按浏览按钮时,图像选择器将显示iphone的所有图像,通过选择图像,它将返回其路径和名称,我们可以通过该路径和名称进行上传。

Please check the similar question first. 请先检查类似的问题

To fully understand the answer you should also need to read UIImagePickerController Class Reference and ASIHTTPRequest documentation 为了完全理解答案,您还应该阅读UIImagePickerController类参考ASIHTTPRequest文档。

As ASIHTTPRequest library is not supported more by its author, you may use another open source solution - AFNetworking or even the Cocoa classes, described in the URL Loading System Programming Guide 由于ASIHTTPRequest库不再受到其作者的支持,因此您可以使用其他开放源代码解决方案-AFNetworking甚至Cocoa类,如URL加载系统编程指南中所述。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM