Add accept attribute in upload field properties.
Add accept attribute in upload field properties.

How we can add accept attributes in upload field ?
This question has an accepted answers - jump to answer
This discussion has been closed.
How we can add accept attributes in upload field ?
This question has an accepted answers - jump to answer
Answers
Hi @hemendraongraph .
Are you referring to uploading files with Editor?
Cheers,
Colin
Yes I create field through datatables editor fields
{
label: "Image:",
name: "image_link",
type: "upload",
display: function ( file_id, counter ) {
},
when I click to upload files it's take only pdf files not take other files likes image,vid etc.
I want to it's work like as accept attributes of file but I don't want to create a seprate template and refer here.
Hi @hemendraongraph ,
If you look at this example here, and click on the "Server script" tab, you'll see the restriction is done on the server end.
Cheers,
Colin
@colin It's not possible at the server side becuase I does not want to show all files except pdf file while I choosed at the client side.
Files are choosed from the client side and my Client requirement is not show while choose file.
At the moment you need to use the following after initialising the Editor instance:
In 1.9.1 you'll be able to pass attributes to the field during initialisation using an
attr
option.Allan