adding Google Drive Download Button to your site
Get the Link of your file from Google Drive. Suppose, in my case its
drive.google.com/file.txt . Then add following to your html/javascript to your site.
<!DOCTYPE html> <html>
<head>
<script src= "https://apis.google.com/js/platform.js></script>
<!--This script include google drive api-->
</head>
<body>
<div class= "g-savetodrive" <!--This class name is needed-->
data-src = "drive.google.com/file.txt"
<!--remember this is the link to our file.-->
data-filename="file.txt"
<!--default file name or any other file name with which you want to save the file-->
data-sitename= "yoursitename">
</div>
</body>
</html>
No comments:
Post a Comment