Skynet Directory Default Path
FEATURE REQUEST
Description of Request
we know now that we want a directory to default to loading index.html, with a metadata field that can instruct siad to default to loading another file instead
Reason or Need for Feature
skapps, photo galleries, music collections
Design / Proposal
Default to "/index.html" if the path is empty. Only for directories obviously. Use a metadata field on upload that allows to point to another path instead (I would make it a path and not necessarily a file). We also a way to disable this defaulting behaviour to ensure people can still get the file at the path of their choosing (perhaps redirect=false
in the querystring?)
[ ] Add a map ofsettings
to skyfile's metadata. All keys should be predetermined (so maybe astruct
rather than an actualmap
) and have a default value.-
Add support for the defaultPath
setting that redirects the user to a specific path when they hit the root path of a skyfile that holds a directory. Does nothing for a skyfile with a single file. -
Add support for the redirect=false
query parameter that disables thedefaultPath
setting.
Follow-ups:
- Add support for
tags
.- Flat list of strings. (
["video","bunny","kids"]
) - List of key-value pairs where the values are simple strings. (
{"type":"video","format":"mp4"}
) - List of key-value pairs where the values are comma-separated lists of strings. (
{"age-groups":"toddler,preschool"}
) - A consideration here should be the size of the
tags
structure. People can (and will) go overboard at times, pushing us beyond the 4096 byte storage limit of skyfile metadata. Therefore it might be better to store this elsewhere.
- Flat list of strings. (
Note
It would be nice if the field provided on upload is done in a generic manner. Meaning that we could use it to allow tagging of content on upload in the future. For the time being the metadata field would be hardcoded (e.g. defaultPath
or something), but in the future users could be allowed to have custom tags of their choosing, which would then end up in the Skyfile's metadata. Probably want to pull couple of ppl in a group chat on discord to discuss the architecture before implementing.