Stefan Jenkner

Static URLs

posted by Stefan Jenkner
Posted on Thursday November 13rd, 2008 at 19:14. 530 visits. ( permalink )
Hi folks,

is there a page which explains ipernity static urls like this?
www.flickr.com/services/api/misc.urls.html

If not, please tell me if I'm wrong. Let's take a picture for example:
u1.ipernity.com/9/71/75/3377175.89f51f59.500.jpg

3377175 = id, fixed; 89f51f59 = secret, fixed; last part = the size;

It is safe to replace the size-part of such url with 75, 100, 240, 500 and 560.
It will always fail for 1024 and above, cause the secret-part changes.
Is this correct?

TIA, Sedden

5 Replies

Dirk
Dirk pro says:
ipernity URLs are somewhat hard to understand ;) ipernity definitely has an URL problem. Well ’ it works, but there is not much beautyness in the “beauty URLs” – not even consistency :(

My documents: www.ipernity.com/doc/dirk
A picture: www.ipernity.com/doc/dirk/3167581
The Thumbnail: u1.ipernity.com/9/75/81/3167581.f888942d.100.jpg

And the same picture if i do an api call:

ipernity.com/doc/19181/3167581

Why is there only the user ID instead of the user name?

And what does “9/75/81” stand for? I guess, “3167581.f888942d” is unique. Why not create a functionality to “wrap” this complicated …

u1.ipernity.com/9/75/81/3167581.f888942d.100.jpg

… to somewhat more easy to recognize like …

www.ipernity.com/doc/dirk/3167581/100
3 years ago
Christophe Ruelle
A Christophe Ruelle pro replies:
The user web alias missing in the doc URL is a performance issue. We'll find a way to keep the alias everywhere in the future.

yes, URLs are a bit complicate but we always provide full URLs to avoid questions like "why are urls complicated" LOL
In fact, it's complicate because we use up to 4 different secrets to protect document sizes and medias.
For instance a photo has :
- 1 secret for 75x, 100, 240, 500, 560 sizes
- 1 secret for the 1024
- 1 secret for the original
Most API methods accept the parameter thumbsize to return the desired thumbsize.

For your personal understanding let's analyse u1.ipernity.com/9/75/81/3167581.f888942d.100.jpg :
u1 : the URL server
9 : the RAID volume
75/81 : the last 4 digits of the document ID, used as the directory hash.
3167581 : the document ID
f888942d : the secret
100 : the size

and Yes Dirk, we could provide simpler URLs, but who really cares when you get them already constructed with the API? And even if you like to construct them yourself you can not guess the exact dimensions.

We will definitly make a documentation about this.
3 years ago
Dirk
Dirk pro replies:
URLs should be “beauty” – It’s nothing rational ;)

Thanks for your explaination!
3 years ago
Stefan Jenkner
Stefan Jenkner replies:
Thanks for explaining it!

Using this information I just wrote a Template-filter for Django:
www.djangosnippets.org/snippets/1193
3 years ago
Christophe Ruelle
A Christophe Ruelle pro replies:
I've just discovered Django... looks like a very cool framework.
3 years ago

You must be logged on to post a reply. Sign in now?


rss Latest comments – Subscribe to the comment feed for this topic.

 

Català | Čeština | 中文 | Deutsch | English | Español | Esperanto | Ελληνικά | Français | Galego | Italiano | Nederlands | Português | Polski new | Svenska | Русский new | More ...