Search code examples
google-drive-apigoogle-drive-realtime-api

Error 500 when trying to load realtime document of a document file


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?


Solution

  • 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.