This is a simple javascript code to upload file from your computer to google drive using google drive api
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<script src='https://apis.google.com/js/platform.js'></script>
<div class="g-savetodrive" data-src="/images/attendance.png" data-filename="ppupload1.jpg" data-sitename="Pictures of " >
</div>
</form>
</body>
</html>