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) /api/nav/db/1/attachments//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.

In reply to: Krystian Golik

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.

Hi,

Unfortunately, I cannot use PowerShell on the application server in the context of the WEBCON service account.

Did you know that with WEBCON you can automate virtually any process? Even baking cookies 🍪
 
Speaking of cookies: we use the ones that are essential for our website to function properly, as well as additional ones that help us customize our content to your preferences. If you don’t mind cookies, click Accept. If you want to learn more, explore settings.
Settings