removed too hard constraint on mime type
This commit is contained in:
parent
7e11355a89
commit
7f63a6f321
|
@ -169,13 +169,13 @@ class FileInputRenderer extends Renderer{
|
||||||
const ename = tgt.getAttribute("name")
|
const ename = tgt.getAttribute("name")
|
||||||
if(ename === this.name){
|
if(ename === this.name){
|
||||||
const file = ev.target.files[0]
|
const file = ev.target.files[0]
|
||||||
if(file.type !== this.schema.contentMediaType){
|
/*if(file.type !== this.schema.contentMediaType){
|
||||||
alert("Unsupported media type. Must be " + this.schema.contentMediaType)
|
alert("Unsupported media type. Must be " + this.schema.contentMediaType)
|
||||||
ev.stopPropagation()
|
ev.stopPropagation()
|
||||||
ev.preventDefault()
|
ev.preventDefault()
|
||||||
tgt.value = null
|
tgt.value = null
|
||||||
return false
|
return false
|
||||||
}
|
}*/
|
||||||
if(file.size > 100*1024){
|
if(file.size > 100*1024){
|
||||||
alert("This input allows only small files (100K). Use references instead ")
|
alert("This input allows only small files (100K). Use references instead ")
|
||||||
ev.stopPropagation()
|
ev.stopPropagation()
|
||||||
|
|
Loading…
Reference in New Issue