1

I have some code that has been happily creating sheets files in google drive by uploading csv files. Over the weekend, it stopped doing that and started resulting in docs files instead. Am I doing something wrong? Or is this a glitch in drive?

insert := service.Files.Insert(&drive.File{
    Title:    filename + ".csv",
    MimeType: "text/csv",
    Parents:  parentIds,
}).Convert(true).Media(inBuf)
driveFile, err := insert.Do()
if err != nil {
    return err
}

Thanks for any ideas.

This is using v2 of the google sdk (githubb.com/google/google-api-go-client/drive/v2).

Grokify
  • 15,092
  • 6
  • 60
  • 81
user1959101
  • 113
  • 4
  • What library are you using, the one I found was recently updated (possibly a cause for the changes you saw)? – ttacon Feb 17 '15 at 18:05
  • I'm using code.google.com/p/google-api-go-client/drive/v2 which doesn't seem to have been updated recently. Which one did you find? Thanks. – user1959101 Feb 17 '15 at 19:07
  • I was looking at [https://github.com/google/google-api-go-client](https://github.com/google/google-api-go-client). – ttacon Feb 17 '15 at 19:26
  • Hmmm. I had ended up on the older code. Unfortunately, updating to the the newer code on github didn't fix things. Thanks for catching that though. – user1959101 Feb 17 '15 at 19:56
  • try to trace the http. Likely cause is either (a) you're sending the wrong mime type (which could be an SDK bug), or (b) Drive is incorrectly interpreting the mime type (there was a similar bug last week affecting Javascript mime types) – pinoyyid Feb 18 '15 at 11:37
  • Did you ever find a solution to this? – SwiftD May 10 '16 at 10:07

0 Answers0