When i upload image/video one after another (e.g. one image then video) then it throws error like "Cannot read property 'file' of undefined"
When i upload image or video very first time then it works.
My current code:
flow.on('filesSubmitted', function (file) { if (file[0].file.type.toLowerCase().indexOf("video") >= 0){ $('#videoProcessingModal').modal('show'); } else { $('#processingModal').modal('show'); } $('.modal-scrollable').css('zIndex', 65538); $('.modal-backdrop').css('zIndex', 65537); flow.upload(); });
Error:
training.bundle.js:24760 Uncaught TypeError: Cannot read property 'file' of undefined
at Flow. (training.bundle.js:24760)
at Flow. (flow.js:208)
at each (flow.js:1573)
at Flow.fire (flow.js:207)
at Flow.addFiles (flow.js:597)
at HTMLInputElement. (flow.js:412)
When i upload image/video one after another (e.g. one image then video) then it throws error like "Cannot read property 'file' of undefined"
When i upload image or video very first time then it works.
My current code:
flow.on('filesSubmitted', function (file) { if (file[0].file.type.toLowerCase().indexOf("video") >= 0){ $('#videoProcessingModal').modal('show'); } else { $('#processingModal').modal('show'); } $('.modal-scrollable').css('zIndex', 65538); $('.modal-backdrop').css('zIndex', 65537); flow.upload(); });
Error: training.bundle.js:24760 Uncaught TypeError: Cannot read property 'file' of undefined at Flow. (training.bundle.js:24760)
at Flow. (flow.js:208)
at each (flow.js:1573)
at Flow.fire (flow.js:207)
at Flow.addFiles (flow.js:597)
at HTMLInputElement. (flow.js:412)
Hoping for quick response.
Thanks in advance.