Hello everyone,
I reviewed many similar questions, but none were covering what I needed.
I have been trying to find a programmatic way of uploading a file to a SharePoint Site, which contains also some column data. The core goal that I have is to iterate through local files, which are mapped in a way to a CSV and then import them with the respective metadata into SP.
I have been looking around the MS documentation and tutorials and the closest thing I found is this - https://learn.microsoft.com/en-us/graph/api/listitem-create?view=graph-rest-1.0&tabs=java
Unfortunately this one is not exactly what I need.
Further I am able to upload a file to OneDrive, but there seems to be no documented way for a file in SharePoint. I would guess it should look like this somehow:
graphClient.sites().bySiteId(ApplicationProperties.siteId) then add or put.
Thank you!