Direct Linking to assets on SkyDrive

I love SkyDrive – Free 25GB storage, you can map it like a drive letter if you have Vista or Windows 7, useful for storing files on that you want to be able to access from anywhere… but if you want to share those files with the public it starts getting tough – If there was an “Email a link to a friend” option, you could email it to yourself… or if it was not all JavaScript-driven, you could just right-click the link and copy the shortcut… but none of these options exist.

You can, however send someone a link to the root folders in your SkyDrive – and by reassembling the link, we can use it for other folders too… so lets have a look at the URL for the root “Public” folder:

https://skydrive.live.com/redir.aspx?cid=74c8fb1191265567&resid=74C8FB1191265567%21248

Essentially this looks like a global redirect “page” which takes 2 parameters – the Client ID (cid) and the Resource ID (resid) – The Resource ID takes the format of the Client ID, An Exclamation point (ASCII encoded) and the Resource ID (in the URL above it’s 248). When you navigate into any folder, the Resource ID appears in the URL – So you can take the URL you see, pull out the Resource ID and Client ID and put it into the URL above and create a link directly to the folder. It’s not that easy, but it’s the most reliable way of doing it manually, and at this time there’s no automated way.

So this:
https://skydrive.live.com/redir.aspx?cid=74c8fb1191265567&resid=74C8FB1191265567%21248

Plus this:
https://skydrive.live.com/?cid=74c8fb1191265567&sc=documents&id=74C8FB1191265567%21248#cid=74C8FB1191265567&id=74C8FB1191265567%211102&sc=documents

Equals this working link:
https://skydrive.live.com/redir.aspx?cid=74c8fb1191265567&resid=74C8FB1191265567%211102

Replace the word “redir” with the word “download” and you have a link that will ship the file directly to your computer…. e.g.:

https://skydrive.live.com/download.aspx?cid=74C8FB1191265567&resid=74C8FB1191265567%211102 (This can be particularly useful to create links to Office documents, videos and images which Skydrive would otherwise open directly in the browser, wrapped in the skydrive UI.

Replace it with the word “embed” and you get a url which just displays the asset itself – useful if you want to use a skydrive image in a blog! Note you can also sometimes get the same URL by clicking the “embed” link in the SkyDrive web interface (if you strip it out from the rest of the iFrame HTML).

Note that %21 is the Ascii for ! – don’t include the 21 in your Resource ID Smile

B

Advertisements

About Brad Saide

I'm a SharePoint consultant. I'm also slowly going bald, seem to have a permanent spare tyre around my waist and enjoy socialising with friends over a beer or 10. The last 2 may possibly be related. Started working with SharePoint when the first version was in limited beta release (participated in the Technology Adoption Program while at Woolworths) and have been committed to the adoption of the technology as a business enabler ever since.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s