In the JS site in have to send an ajax containing an input file to upload AND input texts
var formdata = new FormData(); formdata.append("id",$(\'#i