Connecting a File Viewer web part to a Document Library
This was fun, quick task that I worked on this morning and I wanted to share it with you all in case you haven’t tried this before!
Scenario: I want the File Viewer web part to point to a library instead of a static file.
Solution:
Step 1: In order to get this working you must first add both the File Viewer and Document library web part to a modern page. If you do not have a document library web part on the page, the connection options will not be available for the File Viewer.
Step 2: Next you will need to edit the File Viewer web part and select the ellipses in the top-right corner to establish a connection.
Step 3: Select Connect to source to view the available libraries on the site.
Step 4: Choose the appropriate document library for the drop down list and republish your page.
Now the file viewer will reflect any file selected in the document library instead of connecting to a static file!