[Answer]-How to manage string url parameter properly (primary key issue)

1👍

If you need two identical urls to represent two different objects then your url scheme is conceptually flawed.

With the caveat… clearly this works for Dropbox. It is worth thinking about why this works: in Dropbox you are logged in as a specific user. Each user has their own folder structure, but a user can’t have two folders with the same name.

i.e. there is a hidden variable (user id) that is added to the folder path in order to locate a unique object.

Alternatively, if you are just trying to work around this simpler problem:

Home/Documents/Work
Home/Pictures/Work

i.e. two folders named Work then you just need to consider the whole path like Pictures/Work vs Documents/Work in order to disambiguate them.

Leave a comment