Google Drive, the famous service of web storage created by Google is increasingly used: certainly thanks to its perfect implementation in Android, which equips over 60% of mobile devices sold in the world, but also to the exponential increase in the use of Cloud services by users who appreciate, always plus, the ability to access all their data from their devices with a simple login.
One of the aspects that is a little too cumbersome using Google Drive is the file sharing via direct links: if we try to share an image, a document or any other file using the appropriate button "Share"A link will be generated that will not allow you to download directly, but will show the file inside the browser and from here it will be possible to download.
CREATE DIRECT GOOGLE DRIVE LINKS
To bypass the web display of the file to be shared, making the direct link to the download, you will have to share the file "publicly"Or for"anyone with the link" when you share a file with Drive, a window is displayed containing the sharing url and the possibility to choose the type of access to the file:
- Shared in private: login is required to access the file
- Anyone with the sharing link: login is not required, the file can be viewed by anyone who knows the link
- Publish on the web: login is not required, the file is accessible and the link is freely visible from the internet
After setting a sharing mode that avoids logging in to access the file, you will have to change the url generated by Google Drive which by default is presented in this way:
where FILE_ID is a numerical sequence which identifies the selected file; modifying the url as shown below we will get the direct link to download the file avoiding that it is shown in the browser:
Just copy the number sequence of your file from the original link, inserting it instead of "FILE_ID"In the second link, pYou will appreciate the result of this change by clicking on the following URL example for sharing an image:
but that's not all, if you want to download files in the same way Google Docs (Google's Web-Office platform), the change to be made to the url is slightly different, having to include the format in which the document will be downloaded:
Google Documents: equivalent if we can say so to Word, it is shared with a link with the following structure:
which we will have to change to:
depending on the format we wanted.
In the case of Google Presentation (equivalent to PowerPoint) you can choose between the direct download of the file in PDF o Pptx by changing the url with one of the following formats:
Finally Google Spreadsheet (Excel equivalent), even in this case we can choose to download the file in PDF o XLSX with the following URL format:
Source | Link