如何使用http或https代替ftp进行上传? [英] how to use http or https instead of ftp for upload ?

查看:455
本文介绍了如何使用http或https代替ftp进行上传?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的所有人,

我创建了用于通过ftp上传文件的窗口应用程序.是否可以使用http或https而不是ftp?因为在传输过程中如果发生连接失败,则ftp从初始位置再次传输.

所以我想通过http.传输文件吗?

我的代码:
昏暗的ftp作为新的FTPclient("ftp://122.183.243.48/","u/n","p/w")
而不是如何使用http通过?

我需要尽快的帮助.
在此先感谢..

Dear all,

i have created window application which is used to upload file through ftp.is it possible to use http or https instead of ftp?because during transfer if the connection failure occurs, ftp again transfer from the initial.

so i want to transfer file through http.is it possible?

My code:
Dim ftp As New FTPclient("ftp://122.183.243.48/", "u/n", "p/w")
instead of this how to pass using http?

i need help as soon as possible guys.
thanks in advance..

推荐答案

您可以通过使用类System.Net.HttpWebRequest:
来做到这一点. http://msdn.microsoft.com/en-us/library/system.net. httpwebrequest.aspx [ ^ ].

一些上传示例:
http://stackoverflow.com/questions/566462/upload-files-with- httpwebrequest-multipart-form-data [ ^ ],
http://stackoverflow.com/questions/2796084/how-to-带有-httpwebrequest的Simulation-browser-file-upload-with [ ^ ],
http://stackoverflow.com/questions/4388689/httpwebrequest-fileupload-causes-outofmemoryexception [ ^ ].

您可以根据需要找到更多信息:
http://bit.ly/Vx4PAo [ ^ ],
http://bit.ly/Vx4TQS [ ^ ],
http://bit.ly/Vx4X2Q [ ^ ].

—SA
You can do it by using the class System.Net.HttpWebRequest:
http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx[^].

Some upload samples:
http://stackoverflow.com/questions/566462/upload-files-with-httpwebrequest-multipart-form-data[^],
http://stackoverflow.com/questions/2796084/how-to-simulate-browser-file-upload-with-httpwebrequest[^],
http://stackoverflow.com/questions/4388689/httpwebrequest-fileupload-causes-outofmemoryexception[^].

You can find some more if you need to:
http://bit.ly/Vx4PAo[^],
http://bit.ly/Vx4TQS[^],
http://bit.ly/Vx4X2Q[^].

—SA


这篇关于如何使用http或https代替ftp进行上传?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆