Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
How to Rename and compress image in MVC
Dr.Ajay Kashyap
Dec 2 2016 11:02 PM
209
Reply
Hello..
How to Rename and compress image less than size when user upload image.
Given Below Is My Code Of Image Upload :-
if (ProfileImage != null)
{
if (ProfileImage.ContentLength > 0)
{
var fileName = Path.GetFileName(ProfileImage.FileName);
var path = Path.Combine(Server.MapPath("~/Upload"), fileName);
sud.ProfileImage = fileName;
ProfileImage.SaveAs(path);
ModelState.Clear();
}
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
How to use Session In Mvc
open popup after page load