thrace-project / media-bundle

The `ThraceMediaBundle` handles file, video, audio and image upload plus some image manipulations.
MIT License
11 stars 10 forks source link

Video upload broken. #10

Open centove opened 8 years ago

centove commented 8 years ago

When trying to upload videos it would not work. I traced it down to the js function 'FilesAdded in media-upload.js

You have this: [code] var fileCount = up.files.length; ids = jQuery.map(up.files, function(item) { return item.id; }); for (i = 0; i < fileCount; i++) { uploader.removeFile(uploader.getFile(ids[i])); } [/code]

If the filecount == 1 you remove it anyway and don't start the upload.

If this block is re-worked to only remove files when the count is > 1 things work as expected.