PdcSharepoint.DownloadFile

From External Bemet Wiki
Revision as of 14:44, 28 January 2022 by TC (talk | contribs) (Note)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Declaration

DownloadFile(strItemId As String, strFileLocation As String) As Boolean

Description

Download the file in Sharepoint targetted by strItemId.
If unsuccessful, PdcApplication.LastError will contain an error message

Notes

IMPORTANT:
This function requires libeay32.dll and ssleay32.dll (both versions 1.0.2.21 or higher) to be present in the PDCWIN directory
This is important for TLS 1.2 support in the TIdHTTP component, which is required for the Sharepoint download URL

For downloading see: https://github.com/IndySockets/OpenSSL-Binaries
Do NOT choose win64!

Code example

Dim sp As PDCEXT.PdcSharepoint = PDC.App.Sharepoint("scriptLocation")
Dim resultId As String = sp.UploadFile("C:\files\test.txt")
sp.DownloadFile(resultId, "C:\files\testResult.txt")

Availability

Available since 2021R4