Flext Inc.
Flext Inc.

Reputation: 11

How can I increase the google drive quota limit?

So I have a HTML5 video player that plays a video from Google Drive. The video is more than 100MB in size, so I created a Google Drive API key and included it in the code for the video. However, I can only play about five videos until my quota runs out. Am I doing something wrong? Is there a more efficient way to play the video, without constantly running out of my quota? This is the error I'm getting:

{ "error": { "errors": [ { "domain": "global", "reason": "downloadQuotaExceeded", "message": "The download quota for this file has been exceeded." } ], "code": 403, "message": "The download quota for this file has been exceeded." } }

Here's my code:

<!doctype html>

<script type="text/javascript">
  function init() {
    window.parent.postMessage("ready", "*");
    window.onmessage = (event) => {
        var video = document.getElementById('video');
        var source = document.getElementById('source');
        source.src = "https://www.googleapis.com/drive/v3/files/" + event.data.id + "?key=<APIKEY>&alt=media"
        video.appendChild(source)
        video.addEventListener('loadeddata', function() {
            video.currentTime = event.data.playHead;
        });
    }
  }
</script>
<video id="video" width="100%" height: auto controls style="display:block; margin:0 auto;">
  <source id='source' src="" type="video/mp4" />
</video>

Upvotes: 1

Views: 4756

Answers (1)

Linda Lawton - DaImTo
Linda Lawton - DaImTo

Reputation: 116918

How to increase the google drive quota:

  1. go to https://console.developers.google.com/

  2. Left hand side select Library search for google drive api

  3. Click manage (blue button)

  4. Left hand menu select quotas

  5. Click the pencil icon to increase the quota.

enter image description here

Upvotes: 2

Related Questions