how to get download link from a file
AhmedRyad22 opened this issue · 5 comments
hi sir.
pls can you show me how to get the download link of an uploaded file from drive ?
is there any method for that ?
i want to download a file directly by this link
thanks in advance <3
or how ot get the share link form a file that would be so useful also
Hi,
Is it possible to get the link with this:
Storage::cloud()->url($path);
You may need to share the file first, but not 100% sure about that.
Full example:
laravel-google-drive-demo/routes/web.php
Lines 269 to 296 in a545a75
thank you so much sir
@ivanvermeyen Hi.
From what I gather from the code you posted, it loads all files in a collection and finds the path by comparing the filename. If I have many files wouldn't that create a problem? (The usage I have in mind could reach more than 80,000 files)
Isn't there another way to get the path (when uploading the file for example)?
Thanks
I think you can if you use the underlying package directly.
https://github.com/nao-pon/flysystem-google-drive
Laravel's Storage::put()
method doesn't return the path unfortunately.