socketio-file-upload
socketio-file-upload copied to clipboard
How do you submit files submitFiles() manually ?
Am I doing anything wrong ?
HTML
<input type="file" class="file-brows"
onchange="angular.element(this).scope().onChangeStartFileUpload(event)" >
JavaScript
scope.onChangeStartFileUpload = function(event){
var files = event.target.files;
// upload.submitFiles(files[0]);
// upload.submitFiles(files);
};
I'm not an angular expert, but by the looks of it, the "onchange" event handler is referencing a global variable named "event". That's probably not the correct syntax.
But there is a file inside the event.target.files.
So then, what's wrong? How is it not working?
Try to uncomment the line "// upload.submitFiles(files);"