2

I can create a shortcut file like so:

gapi.client.drive.files.insert(
    {'resource':
        {'title': 'shortcut document',
        'mimeType': 'application/vnd.google-apps.drive-sdk'}}
).execute();

and subsequently load a realtime document with the resulting fileId (which looks like 0B0OUnldiyG0hSHQ1Tng2d21lZDg):

gapi.drive.realtime.load(fileId, onFileLoaded);

and I can successfully create a real document file like so:

gapi.client.drive.files.insert(
    {'resource':
        {'title': 'real document',
        'mimeType': 'application/vnd.google-apps.document'}}
).execute();

but then the gapi.drive.realtime.load(fileId, onFileLoaded) call results in a 500 error. The fileId for a document looks like 1E6IVZeVV6xbeNPeC0BK8RnwgY80a3wRkhtIt5N3ElmU.

Is there anything special I need to do to load a realtime document on a non-shortcut file?

Christopher Best
  • 466
  • 4
  • 14

1 Answers1

2

Right now you can't create a realtime document on a google doc/sheet/slide. You can do so on any binary format.

If you have some important use case for it, let us know, we may be able to enable it.

Cheryl Simon
  • 46,552
  • 15
  • 93
  • 82
  • Thanks. I don't have a case for it. It was just part of a test to try to figure out why gapi.drive.realtime.get isn't working for me (http://stackoverflow.com/questions/18001043/why-is-the-response-to-gapi-client-drive-realtime-get-empty) – Christopher Best Aug 16 '13 at 18:14