Open thexs-dev opened 9 months ago
There is what I would consider a bug in the /drive/v3/files/${fileID} endpoint that's hit when calling drive.files.get
or drive.files.export
in that the server is always returning a Content-Type of "text/plain;charset=UTF-8". This Stack Overflow answer, https://stackoverflow.com/a/63818644/1075909, explains how to work around this. Other related SO post, https://stackoverflow.com/questions/66799006/unwanted-content-type-text-plaincharset-utf-8-header-in-google-drive-api-res
I am using the following code to get the content of a text file uploaded (plain text with MimeType.JAVASCRIPT) to Google Drive.
It gets the actual content in Google Drive if the content only includes English (charset?) letters
See example below for the word Pharmacy in other languages and what the content is showing between ()
How to fix this issue using the gapi.client.drive.files.get() function?
Thanks in advance for your support on this Fausto