I realized that when searching for the context of a document through API, a URL is returned that downloads the document attached in the process.
How can I make the user first open the document (.pdf for example) and after reading its content decide whether or not to download it? With this, I want to prevent the user from downloading the document whenever he needs to check some information in its content