Quantcast
Channel: Active questions tagged javascript - Stack Overflow
Viewing all articles
Browse latest Browse all 142239

Pass files from input-element to plupload (Add folder)

$
0
0

I want to upload all files of a folder. Since plupload does not offer this functionality, I have an input like this

<input type="file" name="files[]" id="files" multiple directory="" webkitdirectory="" mozdirectory="">

that stores all files out of a chosen folder. I now want to load these to my uploader

uploader = new plupload.Uploader({});

When I try to do so like

$('#files').change(function (){
    if ($(this).prop('files').length > 0)
    {
        uploader.addFile($('#files').prop('files')[0]);
    }
});

it results in

Uncaught TypeError: Cannot read property 'processing' of null

at

uploader.start();

How can I pass file references from my input-element to the plupload-Uploader?


Viewing all articles
Browse latest Browse all 142239

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>