upload Logo file using jquery
can anyone please give me the example how to upload logo file using jquery in C# MVC?? without using POST method..
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
alka vaghelaPosted Oct 1, 2015, 6:03 AM
var files = $("#uploadLogo").get(0).files;
// Add the uploaded image content to the form data collection
if (files.length > 0) {
data.append("UploadedImage", files[0]);
}
// Make Ajax request with the contentType = false, and procesDate = false
var ajaxRequest = $.ajax({
type: "POST",
url: "/Home/uploadfile",
contentType: false,
processData: false,
data: data
});
Ashish VishwakarmaPosted Oct 1, 2015, 5:41 AM
and if logo file is bigger then you can send this in multiple request.
Mukesh KumarPosted Oct 1, 2015, 2:58 AM
Brotsky TvPosted Oct 1, 2015, 2:51 AM
{
}
Check this link :