How to set to upload only PDF files on fieldtype Attach

Thank you again for sharing…
Managed to backport to V12 as i said here…