Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
10
Reply
How to Change Image extensions In MVC
Dr.Ajay Kashyap
Dec 12 2016 2:43 AM
297
Reply
Hello Friends ...
How To Change Image extensions When User Uploading Image In Mvc....
I am Using ImageReSizer nuget Package Manage.
Given Below Is My Code:-
public static string UploadFile(HttpPostedFileBase file,string file_Name,int height,int width)
{
var path = Path.Combine(HttpContext.Current.Request.MapPath(UploadPath), file_Name);
file.SaveAs(path);
ResizeSettings resizeSetting = new ResizeSettings
{
Width = width,
Height = height,
Format = "."
};
ImageBuilder.Current.Build(file, path, resizeSetting);
return file_Name;
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
10
)
Next Recommended Forum
How to pass data from view to controller in mvc
Read Image from local network on MVC 5