Hi all,
I have the below code and trying to have only PDF files
this.upload_file_select = this.page.add_field({
fieldname:“upload_file”,
fieldtype: “Attach”,
options: {‘accept’:‘application/pdf’},
allowed_file_types: [“application/pdf”],
I see that options and allowed_file_types does not work…
if i use html on Develop
$(‘input[type=file]’)[0].accept = ‘application/pdf’
It will work but when added to the code because i cannot add the load event (don’t know actually) the code is not executed…
Any one with a clue of how to set this $(‘input[type=file]’)[0].accept = ‘application/pdf’ so it will show only PDF files ?