How to upload a file to onedrive using C#
I would like to know how to programmatically upload a file to a onedrive subdir fromout a C# app, but it fails everytime. I can read programmatically from onedrive, but not write to it. Since the regular methode: File.Copy(originalFilePath, tempFilePath, true); didn't work out, I looked for any other option that could do the job, but no luck. Even ChatGPT couldn't solve it so far. The idea is that I want to use it in a regular Windows environment. So, a C# program, that I can give to a friend. The point is that I don't want to instruct him with things like 'Do NOT start the program from a onedrive subdir and force him to put it in C:\Temp\ or whatever. So, any action that is needed prior to make this work should be programmable.
Thank you