1. Go to File Upload and Download Security.
Lightning Experience:
Classic:
2. Click Edit button. Do the changes and click Save button.
Specify what happens when users attempt to download specific file types.
Download (Recommended): The file is always downloaded.
Execute in Browser: The file is displayed and executed automatically when accessed in a browser or through an HTTP request. Due to security risks, some file types aren’t available to execute in the browser.
Hybrid: Attachment and document records execute in the browser. Salesforce Files are downloaded.