Skip to main content
Announcements
July 15, NEW Customer Portal: Initial launch will improve how you submit Support Cases. IMPORTANT DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
DBLONDEL1643728674
Contributor III
Contributor III

Upload a file on Microsoft OneDrive

Hello,

I am trying to find solutions to upload files on a Microsoft OneDrive (or Microsoft Sharepoint).

There are no Talend standard components so I am looking at Microsoft Graph API.

Using POSTMAN I successfully upload files with Microsoft Graph REST API.

I have difficulties to find a solution in talend ... with a tREST or with tSystem using Curl.

When I export my request code from Postman it looks like (I've just hidden the token (after Bearer) :

curl --location --request PUT 'https://graph.microsoft.com/v1.0/me/drive/root:/OneDriveFolder/OneDriveFileName.csv:/content' \

--header 'Authorization: Bearer *** very long token string generated by microsoft portal hidden for confidentiality reason ***' \

--header 'Content-Type: text/csv' \

--data-binary '@/C:/LocalFolder/LocalFileName.csv'

Anyone having experienced such case ?

Thanks in advance for your help.

Labels (4)
2 Replies
PaulyWally
Contributor III
Contributor III

Can you install and connect OneDrive on the host that is executing your Talend jobs? If so, then you are just copying "local" files. Talend doesn't know that it's cloud storage.

DBLONDEL1643728674
Contributor III
Contributor III
Author

Thanks for the idea but my PROD execution is on a unix machine ...