I have an asp.net mvc application that allows images to be uploaded. I am wondering what is the best way to do it.
Right now I have this
HttpPostedFileBase uploadedImg = Session[SessionImgKey] as HttpPostedFileBase;
if (uploadedImg != null)
{
string fileName = CreateFile(MyField.Name, uploadedImg);
tableA.ImagePath = String.Concat(ImgFolderPathLoctaion, "\\", fileName);
}
This is fine but I want to move it my service layer and I don't want to have in import a web.dll into my service layer project.
So should I be using a stream? or something like Image Save (I think this might be more geared for images through the paint class not images uploaded.