I have an asp.net mvc application that allows me to upload images. I am wondering what is the best way to do this.
I have it now
HttpPostedFileBase uploadedImg = Session[SessionImgKey] as HttpPostedFileBase; if (uploadedImg != null) { string fileName = CreateFile(MyField.Name, uploadedImg); tableA.ImagePath = String.Concat(ImgFolderPathLoctaion, "\\", fileName); }
This is good, but I want to transfer it to my service level, and I do not want to import the web.dll file into my service level project.
So should I use stream? or something like Save Image (I think it might be more focused on images through the paint class, rather than on uploaded images.
source share