maztt
maztt

Reputation: 12294

jquery getting file value

How can i check whether the file is selected in file upload or not

Upvotes: 0

Views: 400

Answers (1)

Fraz Sundal
Fraz Sundal

Reputation: 10448

To check whether user upload a file or not you can do

var file = $('#FileUploadId').val();
if (file == "") {
alert("Please select a file");
}

Upvotes: 2

Related Questions