How to use save to drive button for digital paid products like pdfs


As we mentioned path of file data-src="file.pdf" which is quite insecure .

One can see that using view-source of page or inspect-element of browser and then he/she can do anything.

Now i have two questions.

1.) And i also want to know some events of save to drive button , can some one help me with that also?

2.) Is there any way of securing the path of file?

Thank you in advance

Edit : I have to validate some thing on server side before make user to upload to his drive.

Edit2 : I have found an example created by @numsu on github numsu/google-drive-sdk-api-php-insert-file-parent-example but it is done with older version of Google API, is there any suggestion how to implement it with newer one.

Show source
| save   | file-upload   | google-api   | google-drive-sdk   | google-api-php-client   2017-01-04 15:01 1 Answers

Answers ( 1 )

  1. 2017-01-05 12:01

    The purpose of the Save to Drive button is to make it easy to save the logged-in user's files on his Google Drive account. If your goal is to use this for paid products try creating a page which is only accessible to paying users. On this page, let the user log into his Google account which will then allow him to use this button. Although, there may be better ways of doing this. You can read more on this Save to Drive guide.

    Check the Examples on how to implement this.

◀ Go back