Naveen hm
Naveen hm

Reputation: 7

Upload file from google drive to my web app when user selects file from google drive picker

I am new to meteorJs framework. I have a use case like when an user clicks on a button google drive picker has to open after google authentication and when user select any file from the google drive that file should get uploaded to my collection(or if I get the readable stream can I upload the stream to my s3 bucket and can I view that file in front end ?).

How do I achieve this process in meteorJs ? Can any one please explain, It will be very help full.

Upvotes: -1

Views: 86

Answers (1)

Oluwafemi Peters
Oluwafemi Peters

Reputation: 48

This is not a Meteor based question . But generally you would achieve this as you would using vanilla javascript . You could set this up in Meteor in a Template.onRendered callback or Tracker.autorun ,or anywhere convenient for you.

NB: Make sure your function doesn't execute before the Template is created .

I assume you know how to get blob/data from google driver api in your desired format.

Then you could check out these

  1. https://github.com/vsivsi/meteor-file-collection
  2. https://github.com/veliovgroup/Meteor-Files
  3. https://www.mongodb.com/docs/drivers/node/current/fundamentals/gridfs/

Let me know if I helped .

Upvotes: 0

Related Questions