OneDrive REST API - Format file content as a plain text when getting its content
I can easily post plain text content to OneDrive using its REST API but I can't get its content back as a text. I only have to download it as a binary and than convert.
Could you please introduce a new formatter for plain text files like:
I've found an example of how to work with that currently
But IMO it would be significantly easier to just use a simple rest request to get a text file content.
Especially it makes sense when you use Application folder for storing some app settings/data etc.
The fix should be super simple like
TxtFormatter : BaseFormatter
Response GetContent(Stream binaryContent)
// convert binary to string with respect to encoding etc
// return string content inside response body (content-type header as plain/text or app/json :))
Is possible to contribute into OneDrive API?))
Currently available formatters if someone is interested.
Olli Vanhoja commented
The presigned URL in the file item object allows you to download the file as it's stored.