0
我已经使用这个插件Angular Schema Form和所有的东西都按预期工作,但对于图片上传,我需要验证,以便允许用户只输入图片。角度模式表格图片上传接受所有文件类型
虽然架构包含接受的上传图片的属性属性如下:
{
"type": "object",
"properties": {
"text1": {
"type": "string",
"title": "Untitled Text field",
"name": "text1",
"url": "http://localhost/image/upload/img59b7c29f1622b.jpeg"
},
"file2": {
"type": "object",
"format": "file",
"title": "Untitled image upload field",
"x-schema-form": {
"type": "file",
"accept": "png|jpg|jpeg|gif"
},
"name": "file2"
}
},
"image": ["text1"]}
仍然是验证不会发生,我可以选择任何文件。