PLUPLOAD Filter 'file extensions' is not being parsed correctly.
AlexanderAdelAU opened this issue · 1 comments
AlexanderAdelAU commented
I don't expect an answer to this age old problem but I will pass on a discovery of sorts.
I have tried all variants and runtimes associated with filtereing file extensions and none work. For example:
`filters: {
mime_types : [
{ title : "Image files", extensions : "jpg,gif,png" },
{ title : "Zip files", extensions : "zip" }
],
max_file_size: "200mb",
prevent_duplicates: true
}
Now what I found is that the 'max_file_size' and 'prevent_duplicates' were not active unless I took them out of the filters option, which makes me think that there might be a broader issue either with my system or plupload is not recognising the filter option correctly.
I have worked around the problem with the simple fix:
` var file_types = ["jpg", "gif", "png"];
if (!file_types.includes(up.files[0].name.split('.').pop()))
up.removeFile(file);``
but it would be good to know how to fix this annoying problem.
AlexanderAdelAU commented
N/A