How to download files from Google drive using download component?

Hello ,
This is my first topic on kodular community.
I’m a newbie. I’m making an educational app. I need to download files from Google drive.
The files are saving as png (I can’t specify the file format, because sometimes the file may be pdf/png/mp4)and I don’t know how to get the file format from such a url(mentioned below)

Here is an example of link
https://drive.google.com/u/0/uc?id=1EyblOrEB6pJFLLT15IziIG772XhW4xvB&export=download (it’s a PDF file)

Blocks:

Screenshot_2020-08-04-12-47-24-53

pleasese help me
Thanks in advance :blush:

1 Like

You can download the archive, and later, go to downloads and pick up the link where it is from.


(In this case: https://doc-14-5o-docs.googleusercontent.com/docs/securesc/1i6cnoj70ff7rk17m8fg44pqsv01s8gh/8t1t7ovnvfs2k3h6gi8o3f4vurphbukd/1596531375000/00223541411410442036/14932301822484624318/1EyblOrEB6pJFLLT15IziIG772XhW4xvB?e=download&authuser=0 )

If it worked click this as the response

1 Like

Actually the files are downloading and I can find it in my download folder.

https://drive.google.com/u/0/uc?id=1EyblOrEB6pJFLLT15IziIG772XhW4xvB&export=download
It’s actually a PDF file but it’s saving as png. Is there any way to get the file format?

1 Like

It is quite difficult to get mime type of file from an indirect download link.
However, you can try using MimeType method of file tools extensions:

Also why are you not using the value of “mime type”?

1 Like

Thank you . But I need to get the file format before download starts. And then need to save the file with that format.

Here is what happened when I tried to download a PDF file through my app

Please please please please help me

You made two mistakes recently.

  • mentioned/tagged users in your post
  • replied to me without trying to use what I have suggested

I hope you will correct these else you can expect to get no reply even after begging a lot.

What is mime type ? And is it possible to grab link

Is it possible to get the mime type for such a indirect url, actually I don’t have an idea about mime type but Googled it.
And sorry for those mistakes as I said I’m a newbie here.

Hey try this
It is the format of google drive link and download link :arrow_down::arrow_down:

It is the method to grab Download link

Screenshot from deephost youtube channel not mine as video is in hindi so I can’t post here

This links works to download direct your file
https://drive.google.com/uc?export=download&id=1EyblOrEB6pJFLLT15IziIG772XhW4xvB
copy it and paste it in other tab you got result

4 Likes

Thank you. Let me try
:smiling_face_with_three_hearts:

1 Like

Link in which written googleusercontent is private link

1 Like

its in download designer, u have to change default block setting.
default is newfile.png
delete .png and u will got your file