Is there any URL google has that contains the raw data for the file? using https://drive.google.com/file/d/FILE_ID
just takes you to a 'share' section of the file... say I have a .js file on GDrive. If you go to their share link, they have a share page. Is there any link to get the raw javascript from the file, as to use in a <script src="google_link_or_whatever">
?
相关问题
- Is there a limit to how many levels you can nest i
- How to toggle on Order in ReactJS
- void before promise syntax
- Keeping track of variable instances
- How can I force all files in a folder to be owned
NOTE - THIS WAS THE SOLUTION BUT IT NO LONGER WORKS - SEE COMMENT BY @Bobby Fritze below
No API's and no JS necessary. Confirmed now working on latest version of Drive. Great workaround for if your server doesn't use https but a vendor plugin demands https to call in a CSS or other file:
My use case below:
Credit to @chris.huh at: https://productforums.google.com/forum/#!topic/drive/MyD7dgLJaEo
First, go to the sharing settings for your document and choose "Anyone with a link." It will generate a link in the format
https://drive.google.com/file/d/XXX/view?usp=sharing
.Now you can use the following URL format:
https://drive.google.com/uc?id=XXX
Note that I'm seeing an HTTP redirect when I do this, so use
curl -L
on the command line or otherwise make sure that your HTTP client follows redirect.