Google just announced a nice bit of API code that will allow developers to to make it easy for readers of websites to download files to their Google Drive account.

Adding a Save to Drive button on your website is easy. You simply have to include the script and HTML tag below:

<script src="https://apis.google.com/js/plusone.js"></script>
<div
 data-filename="My Statement.pdf"
 data-sitename="My Company Name"
 data-src="/path/to/myfile.pdf">
</div>

It isn’t hard to see how this could come in handy.

About the Author