How can I upload / download image from my google drive using matlab?
Show older comments
How can i upload / download image from my google drive?
3 Comments
ghassan78
on 25 Dec 2018
Edited: madhan ravi
on 25 Dec 2018
Walter Roberson
on 26 Dec 2018
In the Answer I mention , I linked to a discussion from Cris on how to store files on Google Drive .
Accepted Answer
More Answers (1)
Richard Zapor
on 17 Jun 2023
0 votes
Two changes are required to download from a google drive.
1) Set the privilege to Anyone with the link for the file using the triple dots
2) Given a filename of below format: tweak- file/d to uc?export=download&id= while removing /view?usp=sharing
if resourcekey=RESOURCE_KEY exists then also include at the end per Overleaf
Works for urlwrite and imread
urlwrite('https://drive.google.com/uc?export=download&id=1v3GsGgP3p905wzdvUqypL_-djYmxiyzK','2.png');
img=imread('https://drive.google.com/uc?export=download&id=1v3GsGgP3p905wzdvUqypL_-djYmxiyzK','png')
img2=imread('https://drive.google.com/uc?export=download&id=1v3GsGgP3p905wzdvUqypL_-djYmxiyzK');
solution credit to https://www.overleaf.com/learn/how-to/How_can_I_upload_files_from_Google_Drive%3F
Categories
Find more on Google in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!