Sharepoint REST API

Tarby777

Member
Hi all,

Does anyone have experience with using the HTTP client to call REST APIs in SharePoint? I have some of the APIs working, but I'm struggling to upload a JPEG with GetFolderByServerRelativeUrl/files/add. I am converting the JPEG to BASE64 and adding it to the request payload, but it doesn't get converted back to a JPEG in Sharepoint (it has the right name, but it contains the BASE64 string rather than the "real" JPEG data).

TIA
 

Cecil

19+ years progress programming and still learning.
I have used the Graph API to upload files to OneDrive and the email attachments using the the OpenEdge HTTP client.

When I up load to OneDrive I just submit the raw payload and don't base64 endcode.

Can you share the sharepoint documentation?
 

Tarby777

Member
I don't have any Sharepoint doco locally - I'm just using what is available for the GetFolderByServerRelativeUrl API online. The upload is working successfully now, since I stored the JPEG - without encoding - in an OpenEdge.Core.Memptr object.

Cheers,
Tarby
 
Top