Skip to content
This repository was archived by the owner on Apr 18, 2026. It is now read-only.
This repository was archived by the owner on Apr 18, 2026. It is now read-only.

responseType on Google Drive API v3 Files: get #704

Description

@brunoimbrizi

Originally submitted to IssueTracker https://issuetracker.google.com/issues/174302344 and recommended to file this in here "Since your feature request seems to be related to gapi.client library"

A short description of the request:
Define responseType on Google Drive API v3 Files: get, which relevant with alt=media.

What is the purpose of this new feature?
To be able to get the response body as blob or arraybuffer. At the moment it seems only possible to get the body as plain text.

Scenario
I am using the Google Drive API to create an application in the browser. I need to download the content of a file stored on Drive.

The v3 documentation for gapi.client.drive.files.get mentions alt=media which works and returns a response body. The issue is that body is plain text and it is not clear it if is possible to define a different responseType i.e. blob or arraybuffer.

The v2 documentation sheds some light on the topic with a JavaScript example to download a file's content. Using a custom XMLHttpRequest it is possible to define a responseType.

Shouldn't it be possible to do the same with gapi.client.drive.files.get?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions