从HTTP Post保存图像(不使用FileUpload Control) [英] Saving an image from HTTP Post (Not using FileUpload Control)
问题描述
无论如何,我都有一个页面(甚至可以使用处理程序)..它正在等待HTTP POST,该页面带有许多变量,包括编码为multipart/form-data内容类型的图像.
I have a page (May even use a handler), anyway.. that is awaiting an HTTP POST with a number of variables including an image encoded as a multipart/form-data Content Type.
如何保存HTTP Post中的图片?
How do I save the image from the HTTP Post?
此HTTP POST编码的图像来自另一个站点,而不是来自本地FileUpload Control.
This image encoded int the HTTP POST is from another site and is not from a local FileUpload Control.
请稍等,我是不是很愚蠢..我不能只使用Request.Files ..
Hang on, am I being daft.. can't I just use Request.Files..
可能很简单,例如 http://dotnetslackers.com/articles/aspnet/Upload_multiple_files_using_the_Ht.aspx
-李
推荐答案
如果发布的表单是multipart/form-data,则只需检查Request.Files集合以检查是否应该在表单中发布任何文件:)
if the posted form is multipart/form-data you can just check the Request.Files collection to check if there should be any files posted with your form :)
这篇关于从HTTP Post保存图像(不使用FileUpload Control)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!