Hi everyone, how can I obtain the list of the extension of files that are shown in an interface by the document viewer?I checked the documentation and there are no indications or lists about the formats allowed.
Discussion posts and replies are publicly visible
Despite what others here have already said: you can also open Text files (i.e. ".txt", aka plaintext) in the Document Viewer field. This is the only common file format (other than images) that I've confirmed can be previewed, beyond PDF files.
FWIW, For image files, I always recommend using a!imageField() instead (they'll open in the Document Preview field but it works a little weirdly). Some time ago I developed a tool that you can pass a file into, and it automatically checks whether the file type is previewable (and whether it's an image), and chooses the appropriate viewer. If it's not a previewable type, it simply displays a download link.