/cors-upload-sample

Sample code for uploading files directly with XHR/CORS

Primary LanguageJavaScriptApache License 2.0Apache-2.0

Google drive upload

Live test

You need to add your domain to your Google Console and get an OAuth key. Replace data-clientid in the HTML with your own oauth ClientID.

NodeJS

Included is a token-server to auth the server to server token, you need to generate a p12 file under "Service account key" viaGoogle Console.

Then: 1.) openssl pkcs12 -in key.p12 -out g.pem -nodes 2.) sudo npm install google-oauth-jwt 3.) sudo npm install express 4.) nodejs token-server.js &