TECHNOLOGY INSPIRATION
Technology-People-Innovation

Create Direct link to your Files on Google Drive

Google drive is great and one of most convenient storage service from Google and better than any other cloud host, most of us love to use Google drive as our main cloud storage and if you use to send files and attachments via Gmail then probably you are using it too but you really don't know.
The best thing about Google drive is we can upload any kind of file in our account
and we can share it and use it online tool for opening universal formats like Photoshop documents or other supported formats by Google Document Viewer. Almost all important formats for people from every profession are supported. See this article about
file types supported in Google Docs(released on 18/02/11).
Google doc in useful but sometimes we don't want to open files within browser and preferred saving them in our local storage and we can do so by creating direct download links for the files shared or uploaded on Google drive.
Make sure you have shared your files with public or anyone with link.
 This article is about how you can create "Direct links" for your files on Google drive download them without opening them in the Google doc viewer.
A normal url for a file on drive looks like this :-
  http://drive.google.com/file/d/idgoeshere/edit?ups=sharing
See the Image for better understandingnormal url of file stored on Google drive


This link opens the file within the browser using Google doc viewer and if you want to download the press CTRL + S or go to file menu then click on download option but incase if you want to share a direct download link for that file you can change the sharing URL to download link easily.
If you click to download that file then you will see a file requesting link which redirects to content URL and that requesting link can be used as main base for creating file download link.
  https://docs.google.com/uc?id=file_id&export=download
Just copy file id from sharing URL and replace it with FILE_ID and download URL for your file is ready to shared or placed on websites.
This works fine for your uploaded files expect Google spreadsheet, Docs, and presentation but there is solution for them too.

Creating direct download links for Google Doc files

In case of Google Doc files when we share the file the URL for the file will be like :-
  https://docs.google.com/document/d/FileIDgoeshere/edit?usp=sharing
When you will download any Google Doc in formats like PDF, Open document format or any other supported format provided by Google the structure for link looks like this :-
  https://docs.google.com/document/d/file_id/export?format=fileformat&id=file_id
Replace the both file id with your URL's file id and doc format file and file format with these :-

docx : Microsoft word format
odt : Open Document format
rtf :  Rich Text format
pdf :  PDF format
html : Webpage (zipped)

Creating direct download links for Google Presentation files

The same thing we need to change in case of Google presentations file. The sharing URL for file looks like this :-
  https://docs.google.com/presentation/d/fileidgoeshere/edit?usp=sharing

If we download any presentation file structure of the download URL will be :- 

  https://docs.google.com/presentation/d/file_id/export?format=fileformat&id=file_id
Now replace the both file_id with your presentation's file id and format with supported one and that's the URL for your Google presentation file in which format you selected to download it. Google presentation files can be download as MS powerpoint (pptx) and PDF (pdf) formats.

Creating direct download links for Google Spreadsheet

Spreadsheet files can be also downloaded using the same procedure as Document and presentation files. Shared link for the Spreadsheet looks like this :-
  https://docs.google.com/spreadsheet/d/fileidgoeshere/edit?usp=sharing
If we Download any presentation file the base URL looks like this one:-
  https://docs.google.com/soreadsheet/d/file_id/export?format=fileformat&id=file_id
In the base URL change the both file ID with your Presentation file's ID and formats with supported formats, Spreadsheet can be downloaded as xlsx and pdf format. 

These are simple tricks which can be followed to create direct links download links to the files stored in Google drive.

Post a Comment

[blogger]

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget