How to download file from link of google drive to device

Hello,
I want to download pdf from google drive link…
More clearly, I want to copy the file from URL to device
How can we do this in X?
Any help will be appreciated…

Kartik

3 Likes

Hi there,

If you have a file hosted on Google Drive at https://drive.google.com/file/d/[file ID], you can get a direct download link for it at https://drive.google.com/uc?export=download&id=[file ID]

You can also find websites which do this conversion for you, like this one.

Hope that helps!

Jane

2 Likes

Thank you So Much!

11 Likes

@jane,
Could you please tell me where to get the FileID?
It would be a great help :slight_smile:

Thanks

8 Likes

It’s just the part of the URL after file/d/, but before the next ‘/’ character…
So in https://drive.google.com/file/d/XXXX/view, the file ID is XXXX.

Make sure the URL you’re taking the file ID from says /file/ and not /folder/!

2 Likes

Genius!
Thank you so much!

9 Likes

Oh oh,
I think I replied too early before testing on the app… :sweat_smile:
I just tested on link on PC…
@jane, Now, when checked on App, the button instead opens the file in my google drive app.
What am I missing?
The code :
temp

Thanks!

8 Likes

Can you also help me with this :

Hello,
I have a Pay Screen in my app.
What I want to do is, I want to open Chrome with my payment link(only when the very first time the app is opened) & the second time (when the user presses back from Chrome and comes back to my app),
I want the label to go : Succesfull Transaction! and after 2 sec., open my Menu screen.
How can I achieve this?

Thanks,
Kartik

8 Likes