使用Windows应用程序将图像上传到服务器 [英] Upload image to server with windows application

查看:171
本文介绍了使用Windows应用程序将图像上传到服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个ActiveX控件,该控件将在访问网站时下载.此控件基本上用于在线捕获照片并将其提交回远程服务器.

当我将图像保存在客户端计算机上时,整个功能都起作用,但是在将其发送到远程服务器时,我遇到了问题.

I have created an ActiveX control which will get downloaded while accessing a website. This control basically is used for capturing photos online and submit it back to remote server.

This whole functionality is working when i save image on client machine, but while sending it to remote server, i am facing problem.

Kindly suggest.

推荐答案

尝试以下操作:通过C#Web服务上传任何类型的文件 [ ^ ]
Try this : Upload any type of File through a C# Web Service[^]


您的Web服务器代码需要某种方法来接收控件将其发布到的文件.您使用什么代码取决于您在其中编码客户端网页.


自从最初发布问题以来,您已经更改了您的问题.现在,您说您有一个正在捕获和上传照片的ActiveX控件.好了,它仍然必须使用HTTP将文件重新发布回服务器,但是正如我所说的,必须在服务器上写一些URL来接收文件.

在.NET代码中,通常使用WebClient类及其UploadFile方法完成此操作.
Your web server code needs some method to receive files that that your control POSTS them to. What code you use depends on what you''re coding the client-side web page in.


You''ve changed your question since it was originally posted. Now you say you have an ActiveX control that is capturing and uploading photos. Well, it still has to use HTTP to POST the files back to the server, but as I said, some URL on the server has to be there written to receive the files.

In .NET code, typically this is done using the WebClient class and its UploadFile method.


这篇关于使用Windows应用程序将图像上传到服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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