从桌面上的Windows窗体应用程序中上传服务器中的文件 [英] Upload a file in server in windows form application from desktop
本文介绍了从桌面上的Windows窗体应用程序中上传服务器中的文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设我在桌面的特定目录中有图像 img.jpg ,例如 D:\\\ examplesimg \ img.jpg 。现在我想将图像上传到我的localhost服务器,例如 http:// localhost:6060 / desktop_app / image / 我该怎么做?
我尝试了什么:
现在我正在努力。我使用WebClient上传文件。
suppose i have an image img.jpg in a specific directory of my desktop such as D:\sampleimg\img.jpg. Now i want to upload the image to my localhost server such as http://localhost:6060/desktop_app/image/ How can i do that?
What I have tried:
Now i am working on it. I have used WebClient to upload file.
推荐答案
最简单的方法是使用FTP:简单的C#FTP类 [ ^ ]应该有所帮助。
Easiest way is to use FTP: Simple C# FTP Class[^] should help.
这篇关于从桌面上的Windows窗体应用程序中上传服务器中的文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文