This commit is contained in:
xdrm-brackets 2016-04-20 15:46:19 +02:00
parent 19ffb07860
commit d4b8ac1da2
1 changed files with 2 additions and 2 deletions

View File

@ -4,13 +4,13 @@ var fileInput = document.querySelector('input[type=file]');
fileInput.addEventListener('change', function(e){
/* (1) On rédige la requête */
var request = {
var uploadRequest = {
path: 'upload/call_log',
file: fileInput.files[0]
};
/* (2) On effectue l'upload (import) */
api.send(request, function(response){
api.send(uploadRequest, function(response){
console.log( response );
});