OneDrive is one of the most popular cloud file storage service developed by Microsoft. You can easily share the files and folders that you store in OneDrive by creating share link. But how to get direct/native link for OneDrive files? How to get permanent link for OneDrive files?
What’s the use of direct/permanent link? Direct link is very useful while you want to provide a download link, anyone can download a file by clicking the direct link. And, for a website, it’s very important to have direct file link for downloadable items. Users don’t have to leave the website to download a file.
Get Direct/Permanent Link for OneDrive Files
Follow the two simple steps to get OneDrive permanent link or OneDrive direct link to file –
1. Open OneDrive and Copy Embed Code
To get embed code, open OneDrive and open the file folder and then select the file you want to share. And then right-click mouse on the file. From the options, click on “Embed” (see the picture below).
After this, embed code will be generated for the file. Copy (Ctrl + C to copy) the embed code by clicking on it.
If you have copied the embed code, go to step 2. Can’t get the embed code yet? There is another way to get the embed code! After selecting the item you want to share, click on the dots as seen in the picture.
And then click on the “Embed” from the options.
The embed code will be generated for the file, copy the embed code for the file.
2. Paste the Embed Code and Modify
Now paste the embed code you copied in a notepad or a text editor. This code looks like this one –
<iframe src="https://onedrive.live.com/embed?cid=FA476CAFF1A7E75C&resid=FA476CAFF1A7E75C%21122&authkey=AN_axXpcOy7Zfl8" width="98" height="120" frameborder="0" scrolling="no"></iframe>
You have to modify this code, remove everything except source URL of the file https://onedrive.live.com/embed?cid=FA476CAFF1A7E75C&resid=FA476CAFF1A7E75C%21122&authkey=AN_axXpcOy7Zfl8 and then just replace embed with download to get direct/permanent link. After this modification, the link should look like this –
That’s the OneDrive direct or native link for the file and its a permanent link. So you can use the link for lifetime! The direct/permanent link will skip the Google Drive web viewer. You can test the link we shared. It should start download without going OneDrive website.
You can get OneDrive direct/permanent/native link for any file by this process. The best thing is, OneDrive provides permanent links for large files also, where Google Drive doesn’t provide for large files. There is no way to skip Google Drive web viewer for large files (larger than 100MB).
Hope for the best! Let’s discuss through comments 🙂