I can\'t find the answer to this in the API docs or elsewhere. I see in the docs says you can get a downloadURL of a file, but it refers to it as a \'short lived URL\'. What d
https://developers.google.com/drive/v2/reference/files#webContentLink
downloadUrl is short lived, but webContentLink is a permanent link. It's odd that one is a URL and the other is a "link", but I guess it probably has to do with the additional query params in the strong. Maybe that makes it not just a URL? :)
That property is only available for files that are publically readable, so you may have to use the SDK/API to set the permissions first.
It seems if you have file ID you can access it with such url:
https://drive.google.com/open?id=file-id-here
If file is public, you'll see it immediately but if not, you're be asked to login
Yes, you can get a permalink to any file hosted on Google Drive in a public folder. Just note the folderID:
and paste it to the following URL:
http://googledrive.com/host/<folderID>/<filename>
or you can create a short custom alias using G Drives: http://gdriv.es/<alias>/<filename>
In case someone encounter the same problem and don't want to do with deprecated Google Drive solution above and requires frequently changed files with exact same url, you can use Dropbox. Steps:
Now you have a public, unchanged url for all your foo.exe changes. Enjoy, don't waste time with sites offering you file hosting and they change the URL for same files.
If you share a file publicly in GDrive, you can use the following link to make the file download directly:
https://drive.google.com/uc?export=download&id=FILEID
The problem happens when you want to change the file (for version controlled download, in instance) and keep the same downloading link.
You can use a URL Shortener like bitly.com and use a Branded Bitlink to change the destination URL keeping the input URL.
I hope it works, good luck!
I don't know if such API for google drive exists, but I think you should also have a look at dropbox, which will meet all the demands that you mention in your question.
Also there are some very cool applications developed just for dropbox, like pancake.io which lets you share links of text, html files, in an html page format.
that + permanent link is always there.