提供一些示例源代码,用于将文件上传到多个站点 [英] Give some sample source code for uploading a file to multiple sites

查看:69
本文介绍了提供一些示例源代码,用于将文件上传到多个站点的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Asp.Net中,我可以使用C#将单个文件上传到多个网站吗?

In Asp.Net, can I upload a single file to multiple websites using C#?

推荐答案

我不明白您要问的wtf.

有几种选择.

-FTP上传
-Web服务上传
-在Intranet上共享?
-二进制流上传(很可能)

如果您知道每个网站的特定url执行情况以更新文件的内容,则可以编写一个自动化应用程序,以从文件夹集中执行任务,以接收要上传的传入文件.

将文件内容读入二进制流中-将远程URL执行到被动网页内容中,即您的C#应用​​程序(无需构建ASP页面)通过调用在该虚拟页面上执行事件,然后提交.根据该页面-您应该获得一些确认-然后可以构建业务逻辑以通知您的应用程序该文件已从可能的给定网站上载.

当然,您可以通过热配置来根据文件的详细信息/规范指定要上传的页面.
意味着.jpg进入3页,.gi进入5页,依此类推.

如果您的ASP页面上有一个升级的过程,需要分发到多个网站-最好的选择是在被动模式下使用ftp来传输二进制文件-然后在结果发送给您后,将电子邮件发送给您的asp页面的客户端/用户流程完成.

问候,
X
I dont understand wtf you are asking.

There''s several options.

- FTP upload
- Web Service Upload
- Share on intranet ?
- Binary Stream Upload ( Most probably)

If you knwo the specific url execution per website to uplaod the content of the file then you can write a automated app todo the task from a folder set to receive incoming files for upload.

Read the file contents into a binarystream - execute the remote url into a passive web page content iside your c# app (not need to build asp page) execute the event on that virtual page by means of invoke then submit it. Depending on that page - you should get some hwo a confirmation - you can then build your business logic to inform your app that the file was uploaded out fo the possible given web sites.

Of course, you can have hot config to specify what pages to upload based on the file details / specifications.
meaning .jpg goes to 3 pages, .gi goes to 5 pages, etc.

If you have a uplaod process on your ASP page that you need to distribute to multiple web sites - your best bet is to use ftp in passive mode to transfer the binary - then email the client / user of your asp page on the result after your processes are complete.

Regards,
X


这篇关于提供一些示例源代码,用于将文件上传到多个站点的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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