Standard for referencing item(s) via the query url

TL;DR: Is there a standard for referencing solid files/folders via the url and, if not, do you have any thoughts on it?
For instance: https://.../app.html?url=https://link/to/file.ext

While working on a filemanager for solid, I came up with the idea to add an “Open with…” option. This would allow users, to open items with an application of their choice (e.g. open the coding project with a code editor for solid; open the song with this music player). I believe, that this would be beneficial for the user experience, as they wouldn’t have to copy/paste links and/or navigate to their files that often. Furthermore I am convinced, this would contribute to easier switching between interoperable apps.

For implementing such an “Open with…” option, it would be useful to have a common pattern in which links to files/folders are passed to urls. Without a standard, it would be necessary to ask the user for the pattern for each application (i.e. the user has to specify, which keys are used in the query url and how multiple files are handled), which seems like unnecessary overhead for users. Therefore I would suggest a standard for referencing items via the query url.

As I am definitely no expert on this, I look forward to other opinions, but here is my suggestion:
-> Multiple items: ?items=encodeURIComponent(JSON.stringify(itemLinks))
-> Òne items: ?url=encodeURIComponent(itemLink)
The first one would be good for referencing multiple files (e.g. code files, playlist, …).
The second seems like a common way, so I wouldn’t change that.

1 Like