This Challenge is to download a file from GoogleDrive given its "copylink" provided URL and a file name.
GoogleDrive links fail for Matlab function like urlwrite, imread, imwrite, webread, and others.
The file 2.png is given by https://drive.google.com/file/d/1v3GsGgP3p905wzdvUqypL_-djYmxiyzK/view?usp=drive_link, which will bring up the file in a new window but this URL fails for matlab commands.
The GoogleDrive file must be "Shared" . The file must at least have share to those "anyone with this link".
To enable file download the Google URL string must be modified:
1) Delete the end '/view?usp=*'; Anything after and inlcuding "/view" must be deleted
2) Replace 'file/d/' with 'uc?export=download&id='
Given a URL and filename download the URL contents into a file called filename in the local Cody directory.
Verification will be done by file name and file size.
Solution Stats
Problem Comments
1 Comment
Solution Comments
Show comments
Loading...
Problem Recent Solvers9
Suggested Problems
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
2053 Solvers
-
Equidistant numbers containing certain value in an interval
91 Solvers
-
Number of 1s in a binary string
11403 Solvers
-
Given a window, how many subsets of a vector sum positive
873 Solvers
-
10613 Solvers
More from this Author306
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
Even though template says url=GoogleDrive... there is no need to include 'url=' as this output is never used. Cody requires the form "function x=fname(variables)"