下载和上传与ASP.net图片 [英] Download and upload images with ASP.net
问题描述
在我的web应用程序,我需要能够允许用户上传和下载他们的图像。这怎么可能不要在ASP.net?
In my web application, I need to be able to allow users to upload and download their images. How can this be don in ASP.net?
欲用户能够登录(我已经有完成),并且能够将图像上传到他们的帐户。后来,我希望他们能够下载。
I want to user to be able to sign in (I already have that done) and be able to upload images to their account. Later on, I want them to be able to download them.
感谢
推荐答案
如果该图像是一个合理的规模(例如超过几MB以内),你可以用&LT做到这一点;标签。设置你的表单标签的编码为multipart / form-数据,并实现一些code-背后获得文件的举行。
If the images are of a reasonable size, (e.g. less than a few MB), you can do this with a <input type=file> tag. Set the encoding of your form tag to multipart/form-data and implement some code-behind to get a hold of the file.
See the ASP.Net videos (Part 1) and (Part 2) for a detailed example.
希望这有助于!
这篇关于下载和上传与ASP.net图片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!