相应服务器端代码的Android代码

时间:2022-03-28 03:38:31

I got a code for saving an image sent remotely to ASP.NET server. I want to get the android part for the corresponding code. Would the code in link (http://reecon.wordpress.com/2010/04/25/uploading-files-to-http-server-using-post-android-sdk/) work ? The code that I got has been mentioned below:-

我得到了一个代码,用于保存远程发送到ASP.NET服务器的图像。我想得到相应代码的android部分。链接中的代码(http://reecon.wordpress.com/2010/04/25/uploading-files-to-http-server-using-post-android-sdk/)是否有效?我得到的代码如下所述: -

[Web Method]

[网络方法]

public string SaveImage()
{
    HttpPostedFile file =
    HttpContext.Current.Request.Files["recFile"];
    string targetFilePath = "c:\\" + file.FileName;
    file.SaveAs(targetFilePath);

    return file.FileName.ToString();

} 

1 个解决方案

#1


0  

Here is library which provides useful file uploading functions you are looking for from your android device.

这是一个库,它提供了从Android设备中寻找的有用文件上传功能。

See this link also (it may be helpful to your requirements).

请参阅此链接(这可能对您的要求有所帮助)。

#1


0  

Here is library which provides useful file uploading functions you are looking for from your android device.

这是一个库,它提供了从Android设备中寻找的有用文件上传功能。

See this link also (it may be helpful to your requirements).

请参阅此链接(这可能对您的要求有所帮助)。