Closed acerov closed 3 years ago
the Media.Create method needs to know the file extension so it can set the correct mimeType. Or you can set the mimeType yourself with the latest update of the package.
I’m closing this issue because it has been inactive for a while. Please feel free to reopen if you still encounter this issue. Thanks!
Hi,
I am trying to upload jpg image, IsValidJWToken says JWT is valid but when I try to Media.Create it returns "rest_upload_sideload_error"
My code is simple: `System.IO.Stream fs = System.IO.File.OpenRead(ofd.FileName);
string stringFileName = System.IO.Path.GetFileNameWithoutExtension(ofd.FileName);
var myMediaItem = await client1.Media.Create(fs, stringFileName);`
To test if JWT authentication is working ok I tried to create a post and it works, I created a post without a problem.
Please help.