直接从ASP.net中的字节数组发布文件

时间:2022-08-28 12:19:17

How do you replicate a traditional POST form (file post) in code, the end goal is to stream a byte array as the file into the posted form, the example below is the form that I am trying to replicate in code.

如何在代码中复制传统的POST表单(文件帖子),最终目标是将字节数组作为文件流式传输到已发布的表单中,下面的示例是我尝试在代码中复制的表单。

    <form method="POST" action="http://export.writer.zoho.com/remotedoc.im?apikey=[apikey]&output=editor" enctype="multipart/form-data" target="_self">
<input type="file" name="content" size="38"> <br>
<input type="hidden" name="filename" value="mydocument.doc">
<input type="hidden" name="saveurl" value="[REMOTE SERVER SAVE URL]">
<input type="hidden" name="id" value="12345678">
<input type="hidden" name="format" value="doc">
<input type="submit" value="Edit" class="divbutton" name="submit">
</form>

1 个解决方案

#1


This is done using HttpWebRequestClass , an example of how to do this can be found here http://netomatix.com/HttpPostData.aspx

这是使用HttpWebRequestClass完成的,如何执行此操作的示例可以在这里找到http://netomatix.com/HttpPostData.aspx

#1


This is done using HttpWebRequestClass , an example of how to do this can be found here http://netomatix.com/HttpPostData.aspx

这是使用HttpWebRequestClass完成的,如何执行此操作的示例可以在这里找到http://netomatix.com/HttpPostData.aspx