Trying this out for our project! Where can I get the value for the "parents" as shown on timestamp 6:30 ?
@DaimtoAps3 жыл бұрын
Check out this video kzbin.info/www/bejne/o2TIpqqOmNqpqNU
@narg39313 жыл бұрын
@@DaimtoAps Thank u :D
@DaimtoAps3 жыл бұрын
hope it helps
@gekobcint4973Ай бұрын
Mam, I don’t know you but, I wish you all the best this really saved me.
@yerst22 жыл бұрын
Thank you sooo much for this! This saved me so much time and is exactly what I needed!
@romanryaboshtan92702 жыл бұрын
7:45 you can write media, and all it's a shorter object fields write form
@samehkorashee9925 Жыл бұрын
your method is the only one work around , big fat thanks ♥
@DaimtoAps Жыл бұрын
anytime 😊
@samehkorashee9925 Жыл бұрын
@@DaimtoAps actually i done that method on my webhost as an automatic backup in the cron, so its perfect
@tmfishing902 жыл бұрын
Very detailed and excellent instructions. thank you very much. Save me for my day 😀
@nabillamauludina27492 жыл бұрын
Thank you it helps me really much
@stormerthe2nd3 жыл бұрын
thank you so much for this video, a service account makes this all so easy
@DaimtoAps3 жыл бұрын
I agree!
@Alen_Thomas_2 жыл бұрын
I've to store uploaded images from my website in 2 separate folders. Can i move those folders to drive and retrieve the images from drive ??
@DaimtoAps2 жыл бұрын
you can but its really not an optional solution. drive wasn't intended as file hosting. you may have issues with users accessing the files
@adityachandran7002 Жыл бұрын
THIS WORKED FOR ME !!!!!! thanks alot
@DaimtoAps Жыл бұрын
That's good to hear I love knowing I helped
@MrAvelino20103 жыл бұрын
Can you make one, upload to particular folder and subfolder
@DaimtoAps3 жыл бұрын
Yes you just have to set parents in the metdata object and that will set the parent folder.
@MrAvelino20103 жыл бұрын
@@DaimtoAps i tried following the guide from documentation.but don't return the folder id to store the file there
@ankit34783 жыл бұрын
Error: Could not load the default credentials. -->im getting this error even I have used the correct credentials
@DaimtoAps3 жыл бұрын
Sounds like it cant find the credentials.
@VitaoPlays3 жыл бұрын
I'm having the same problem here. Did you find a way to fix it?
@informationtechnology33932 жыл бұрын
Sorry... I am editing my question... Can a service account open files too? or just create them?
@DaimtoAps2 жыл бұрын
you would need to convert it to a Google doc and use the Google docs API to access it
@projetoskumon60953 жыл бұрын
Excellent! Thanks for sharing your knowledge!
@brightertomorrow33433 жыл бұрын
Great tutorial
@DaimtoAps3 жыл бұрын
Glad you think so!
@wejesuss-11042 жыл бұрын
How do I know if the API I want to use accepts service accounts? I want to upload a video to KZbin
@DaimtoAps2 жыл бұрын
Check the documentation if it doesn't mention it it doesn't support it. The KZbin API does not support service accounts.
@wejesuss-11042 жыл бұрын
@@DaimtoAps yeah, I found it a few days ago
@vladkrutenyuk67152 жыл бұрын
How can I make the same but without service account? I want when you open web page then firstly you should sign-in your google acc and all drive requests will be for you account you chose...
@DaimtoAps2 жыл бұрын
Try following the official example it uses standard oauth2 developers.google.com/drive/api/v3/quickstart/nodejs
@livingjoke30832 жыл бұрын
Was wondering why this example is not shared in a GitHub rep? Makes the process so much easier for new learners that need to understand how this API works.
@DaimtoAps2 жыл бұрын
All samples should be shared on my website. The exact sample I use in videos will be able on GitHub in the future for patreon supporters
@livingjoke30832 жыл бұрын
@@DaimtoAps Well, the issue is that those code samples for this particular project are nothing but methods and declarations. Would be nice to see how you wrap it all together. How you import stuff into the js file etc.
@DaimtoAps2 жыл бұрын
thanks for the feedback! I see your point and will look into it when I get back from vacation.
@dyhia90752 жыл бұрын
wooow worked like magiiiiiiiiiiic , thaaank yooouuuuu
@DaimtoAps2 жыл бұрын
you just made my day thanks
@razorjhon2622 Жыл бұрын
is there anyway to upload the file and give permission to specific users and authenticate it in my website using JWT token ?
@DaimtoAps Жыл бұрын
you would have to code that yourself the service account won't limit it for you
@razorjhon2622 Жыл бұрын
@@DaimtoAps oh but the user will be able to access my google drive and see all data i have uploaded but i just wanted to let the user access the files that he should see from JWT token from the frontend
@DaimtoAps Жыл бұрын
Then your frontend need to be the one controlling who has access to what.
@lesmurphy84662 жыл бұрын
This was helpful thank you!!!
@pudder38510 ай бұрын
Having trouble. I get a 404: File Not found ''. The folder is shared with the service account and I have triple checked everything. Anyone else have this problem?
@DaimtoAps9 ай бұрын
Is it a file on Google Workspace
@pudder3859 ай бұрын
@@DaimtoAps I have tried both a g-suite drive and my personal drive with the same results. Is there something more you must do for workspace?
@pudder3859 ай бұрын
@@DaimtoAps I created a project and service account under my personal google account and it works! But I still cannot get it to work with the gsuite account.
@geraldwaweru3280 Жыл бұрын
How's no one getting this error 'gaxioserror login required'? What could I be doing wrong?
@DaimtoAps Жыл бұрын
There is something wrong with your authorization. Open a new question on stack overflow include your code I would be happy to take a look.
@EBay_Dev3 жыл бұрын
Hi...Greate guide. I have uploaded a bunch of video clips with related subtitles with that specific name. But in the watch mode, I cant see that subtitle... I wonder to know, there is any node.js snippet code to relate clips and movies automatically. Because the number of files is more than I can handle manually?
@DaimtoAps3 жыл бұрын
I think your looking for developers.google.com/youtube/v3/docs/captions/list
@EBay_Dev3 жыл бұрын
@@DaimtoAps thanks for you response. I want exact same functionality in google drive not youtube. as I far as I review the google drive API documentation, I think It isn't there.
@backenddeveloper-rx9ye2 жыл бұрын
can we upload a file to anothers drive based on drive ID ?
@DaimtoAps2 жыл бұрын
you need to have the owner of the drive account authorize your then you can upload to anywhere they have access.
@backenddeveloper-rx9ye2 жыл бұрын
@@DaimtoAps what if on the time of folder creation i changed permission of folder of the drive owner ? so anyone can upload file after that ?
@DaimtoAps2 жыл бұрын
write access requires write authorization of a user. after creating it just add permissions to the user you wish to have access. or write your own interface using a service account
@foobar8463 жыл бұрын
Great video!!! What is the difference between node package googleapi and *googleapi@39* from google drive api Guides?
@DaimtoAps3 жыл бұрын
No idea ;)
@doyouknow19483 жыл бұрын
Great Video !! Thanks a lot. I have small issue. when I upload id is created. but actually file not uploaded to google drive. need to i share google drive directory with service account. if want how it does ????
@DaimtoAps3 жыл бұрын
do a files.list see if the file is there. its being uploaded to the service accounts drive account
@ulisesalcaraz8594 Жыл бұрын
Very good explanation. If the service is in python, does this mechanism of authorization works the same?
@DaimtoAps Жыл бұрын
yes it does
@SteveCirelli2 жыл бұрын
Thanks you for the video, it's hard to find tutorials on googleapis
@DaimtoAps2 жыл бұрын
let me know if you have ideas for other videos with Google Apis
@SteveCirelli2 жыл бұрын
@@DaimtoAps Probably could do one on ways to programmatically get folder ids (I have not checked if you did already). How would you find folder located at /x/y/z? That's where I'm headed next.
@brilliantatosam2 жыл бұрын
Wonderful job
@DaimtoAps2 жыл бұрын
happy uploading 😊
@hkthktm Жыл бұрын
where can I get parents id in your code ?
@DaimtoAps Жыл бұрын
do a file.list and find the file id of the directory you are looking for
@buiquocanh36863 жыл бұрын
i upload success but image file show 0kb, what something wrong ?
@DaimtoAps3 жыл бұрын
If the fie size is 0 then you are not properly uploading the stream. You have only created the file metadata.
@viettran-vm4xi3 жыл бұрын
Great Video
@Carol-ll3po3 жыл бұрын
Hi, i got an error as below const auth = new google.auth.GoogleAuth({ ^ TypeError: google.auth.GoogleAuth is not a constructor Checked the code and the key file all is corrected, not sure if you could advise any possibility that cause the error. Thank you so much for the tutorial!
I agree with the comment below make sure you have added the required.
@DanyDelaCruzM2 жыл бұрын
@@shagyfox Thanks! it's worf for me!
@Vuru3 жыл бұрын
Im getting code 401 Invalid credentials error json :(
@DaimtoAps3 жыл бұрын
Are you sure you created a service account?
@moneyDev11112 жыл бұрын
Uncaught Error Error: Could not load the default credentials.
@DaimtoAps2 жыл бұрын
sounds like an issue finding the file
@nisarggogate89523 жыл бұрын
It was awesome video. I am getting message File Created and its id. But its not visible in my google drive folder which is shared as well as whose id is added in parent inside fileMetaData. Can you please guide what might go wrong? Why is file not visible inside drive?
@DaimtoAps3 жыл бұрын
Do a file.list see if it was uploaded to the service accounts drive account instead. There may be an issue with the parent you set
@nisarggogate89523 жыл бұрын
@@DaimtoAps actually there was a typo... Got it working 😀 Service account makes it lot easy. Btw I am sending doc from react app to nodejs and nodejs to drive. Got that working too after struggle of 2 days 😂... These small success make me feel sooo good ❤️
@raunaqsingh8753 жыл бұрын
From where do i get my KEYFILEPATH ?
@DaimtoAps3 жыл бұрын
its the path to the key file on your system. Check your hard drive.
@raunaqsingh8753 жыл бұрын
Ok thanks I will check
@rodrigeznonames73532 жыл бұрын
Thanks a lot! It will be great if you let us know how to push that in Cloud Run afterwords and still have it working ;/
@DaimtoAps2 жыл бұрын
I didn't have any doubt 🧐
@AndrewMelnychuk0seen2 жыл бұрын
Fantastic stuff!
@ruchika-01922 жыл бұрын
Please menton detailed process
@DaimtoAps2 жыл бұрын
which process?
@jonasstrabel3 жыл бұрын
Great video! Is it possible to Upload a file from a variable, without saving it?
@DaimtoAps3 жыл бұрын
You should be able to do it with any steam. I will have to give it a try 🙂
@chyys_goldenera3 жыл бұрын
Thank you
@faizangulzar19732 жыл бұрын
Thank you so much for this!. Can you plz get me this through some php script. Thanks
@DaimtoAps2 жыл бұрын
I sure can 😁
@faizangulzar19732 жыл бұрын
If you can then plz help me, I am stuck with that.
@lucasfontesgaspareto3 жыл бұрын
Thanks so much
@TarunYadav-dp1id Жыл бұрын
now do this for mf graph.ass api !
@DaimtoAps Жыл бұрын
sorry i dont know that api.
@DaimtoAps3 жыл бұрын
I have uploaded a companion blog post for this video which contains all of the code you will need to follow along. www.daimto.com/upload-image-to-google-drive-with-node-js/
@geraldwaweru3280 Жыл бұрын
I'm stuck on this error 403 GaxiosError: Insufficient Permission: Request had insufficient authentication scopes.
@DaimtoAps Жыл бұрын
Depending upon which method you are calling you need to ensure that you are requesting the proper scope for authorization. You need write access for this call.