TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Dr.Ajay Kashyap
NA
521
284.3k
How to Change Image extensions In MVC
Dec 12 2016 2:43 AM
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;
}
Reply
Answers (
10
)
How to pass data from view to controller in mvc
Read Image from local network on MVC 5