upe
You can do this for images however any other type of files will need to be downloaded. To do this go to Profile > Preferences > Image Attachment View > Inline. For PDFs you can install a browser extension that displays them in the browser.
Cheers.