HTML code is:
<form id="imageForm" action="javascript:void(0)" enctype="multipart/form-data">
<input type="file" id="input" name="picture">
<input type="submit" value="Upload">
</form>
JS code is:
$('#imageForm').on('submit', function(){
var formDdata=document.getElementById('input').files[0];
app.request.post('photo_load.php', { formDdata: formDdata },
function (data){
console.log( data );
});
});