socketio-file-upload icon indicating copy to clipboard operation
socketio-file-upload copied to clipboard

How do you submit files submitFiles() manually ?

Open LeoCreer opened this issue 9 years ago • 4 comments

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);
      };

LeoCreer avatar Sep 01 '16 00:09 LeoCreer

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.

vote539 avatar Sep 01 '16 03:09 vote539

But there is a file inside the event.target.files.

LeoCreer avatar Sep 01 '16 15:09 LeoCreer

So then, what's wrong? How is it not working?

MaffooBristol avatar Sep 01 '16 19:09 MaffooBristol

Try to uncomment the line "// upload.submitFiles(files);"

Tubaleviao avatar Sep 01 '16 23:09 Tubaleviao