Google Drive – How to Hotlink an MP3 with a URL Ending in .mp3

file-sharinggoogle-drivemp3

I would like to obtain a link to an mp3 hosted in Google Drive that has the format filename.mp3, so I can link to it from sites that provide in-line audio players when linking to mp3 files.

I have searched the web and different SE sites, but the closest thing to a solution I have found is obtaining a direct download link for the file or advice on hosting it elsewhere. However, for (future) convenience I would prefer to host and link directly from / to Google Drive.

Can anyone provide some insight or point out why this might not work?

Best Answer

Yes, it is possible.

  1. First, change the directory permission to public in which your mp3 files reside.

  2. Copy the folder ID, that will be at the end of URL when you are inside the directory. It will be something like this

    0C2QKl-TsV6cVTE7wbWNOelRiRlk
    
  3. Next you can access the mp3 files using hosted mode:

    https://googledrive.com/host/0C2QKl-TsV6cVTE7wbWNOelRiRlk/filename.mp3
    

Note that the beginning part of the URL changes to https://googledrive.com/host/ for hosted mode compared to "normal" shared link mode URL https://drive.google.com/open?id=.