PdcSharepoint.DownloadFile: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
Line 6: | Line 6: | ||
If unsuccessful, [[PdcApplication.LastError]] will contain an error message | If unsuccessful, [[PdcApplication.LastError]] will contain an error message | ||
== | == Notes == | ||
IMPORTANT:<br> | IMPORTANT:<br> | ||
This function requires libeay32.dll and ssleay32.dll (both versions 1.0.2.21 or higher) to be present in the PDCWIN directory<br> | This function requires libeay32.dll and ssleay32.dll (both versions 1.0.2.21 or higher) to be present in the PDCWIN directory<br> | ||
Line 12: | Line 12: | ||
<br> | <br> | ||
For downloading see: https://github.com/IndySockets/OpenSSL-Binaries <br> | For downloading see: https://github.com/IndySockets/OpenSSL-Binaries <br> | ||
Do NOT choose win64! | Do NOT choose win64! | ||
== Code example == | == Code example == | ||
Latest revision as of 14:44, 28 January 2022
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