Offline assets
Create assets that can be viewed offline with Retool Mobile.
The Offline Assets app setting in Retool Mobile allows you to store PDF files that can be retrieved and viewed offline, or in situations where internet connectivity is limited.
Create a new offline asset
PDF is currently the only file type allowed for Offline Assets.
To create a new offline asset, upload a PDF URL to your mobile app from App settings > Offline Assets.
- Click the App settings (gear icon).
- Select Offline Assets.
- Click the Add new button.
- Populate the Name and URL of the PDF.
- Click Add.
View an offline asset with PDF Viewer
To view your PDF with the PDF Viewer component, your URL must have a policy that allows retool.com to access the PDF file. CORS policies vary between cloud and self-hosted (for example, https:{domain}.retool.com
for cloud-hosted organizations, and FQDN
for self-hosted organizations). To view an example CORS policy, refer to Configure the CORS policy.
You can also upload a PDF as a Retool Storage resource, and select Copy URL from the ...
dropdown menu.
To use the PDF Viewer component:
- Open the Component tree panel.
- Select the + to add a new component.
- Select the PDF Viewer component and drag it to the App IDE.
- In the Inspector, select Offline Asset from the PDF source dropdown.
- Select the Offline Asset to view from the dropdown list.
The PDF Viewer component displays the selected offline asset.