Skip to content
This repository was archived by the owner on Apr 27, 2021. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<head>
<meta charset='utf-8' />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="https://apis.google.com/js/client.js"></script>
<script src="https://apis.google.com/js/client.js?onload=googleJsApiOnLoad"></script>
<script type="text/javascript">

/**
Expand Down Expand Up @@ -295,7 +295,7 @@
//small objects (under 64k) so to support larger file sizes
//we're using the generic HTTP request method gapi.client.request()
var request = gapi.client.request({
'path': '/upload/storage/v1beta2/b/' + BUCKET + '/o',
'path': '/upload/storage/' + API_VERSION + '/b/' + BUCKET + '/o',
'method': 'POST',
'params': {'uploadType': 'multipart'},
'headers': {
Expand Down Expand Up @@ -512,9 +512,9 @@
/**
* Set required API keys and check authentication status.
*/
function handleClientLoad() {
function googleJsApiOnLoad(){
gapi.client.setApiKey(apiKey);
window.setTimeout(checkAuth, 1);
checkAuth();
}

/**
Expand Down Expand Up @@ -565,10 +565,8 @@
/**
* Driver for sample application.
*/
$(window)
.bind('load', function() {
addSelectionSwitchingListeners();
handleClientLoad();
$(function(){
addSelectionSwitchingListeners();
});
</script>
</head>
Expand Down