Trying to access file attributes from an input field after a file is selected.
Tried this but get the error ‘file not defined’
var file = $("#uploadedfile").prop("files")[0];
var fileName = file.fileName;
var fileSize = file.fileSize;
alert("Uploading: "+fileName+" @ "+fileSize+"bytes");
If
#uploadedfileis an input with type “file” :Normally this would fire on the change event, like so:
FIDDLE