my html code:
<input type="file" id="myFile" name="files[]">
ajax code:
var file = document.getElementById('myFile').files[0].name;
var poststr = 'file='+ escape(file)+'&key='+ escape('project_creation');
makePOSTRequest('controller', poststr,'bdy');
Controller:
if (param.equals("project_creation")) {
param="project_creation";
int proj_id = hlp.createProject(req,emp_id);
}
while retrieving through request i am getting only the file name. I need to save the file in local path.
Any help will be appreciated. Thanks in advance.