Home > Forum > Plugins > SDK - download a file from attachments(webcon 2022)

SDK - download a file from attachments(webcon 2022)
0

Hi, I am looking for a solution to download a file from attachments by ID for users who have disabled the attachment panel (they can't see all attachments) or for those who do not have permission to access attachments. However, I need to allow them to download a specific attachment from a document.
I know I can use this URL(for those who have only disabled attachments panel) <SITE ADDRESS>/api/nav/db/1/attachments/<ATTACHMENT ID>/download, but I would prefer a solution based on the SDK.

Could you give me some hints?

Hi Franek,

Try the functionality described by WEBCON on kb.webcon - link below.
https://kb.webcon.pl/eksport-zalacznikow-do-zip-na-udziale-sieciowym-za-pomoca-akcji-powershell/

This functionality using PowerShell,noperates in the context of the WEBCON service account, so it should have access to all attachments. You definitely need to grant network share access to this account where it will generate the attachments.