Conversation
|
Sounds good and starting with #136 is a good idea. The theming app logos per examples should be stored on that FS. Would we have files and apps as top folders and then your hierarchy in files? |
|
Well as I see it we will have Factories providing this. So using #136 there is a folder Thumbnails. We will then have 1 simpleFS on top of that. This will use the fileid as the foldername and the thumbnails inside it. Just like it is now. For the avatars it will be a folder avatar on which we map this SimpleFS. And then the folders are the UID and the files inside the fodlers the different sizes of avatars. We could also have a theming folder where you map a SimpleFS on of course. So each part of the code that would need a simpleFS would just have a factory that creates it for us. |
|
@LukasReschke you mentioned on IRC the 'only one level'. See #1039 (comment) why this is not really an issue. Also there is a reasoning behind this. If we allow nesting of folders then it becomes hared to map it for example to a key value store. And a limit of 2 folders is kind of arbitraty as well ;). My point being that if there is a limit we might as well limit the root to have all folders and the folders to contain only files. I'm not claiming that this is sufficient for all future appdata we might want to store. But it solves it for previews and avatars currently. If in time it turns out we need something with more features we can always extend. This is the minimal set we need for those and it keeps things insanely simple. |
* Introduce simpleFS * Introduce IAppData * Introduce AppData Factory to get your AppData folder * Update FileDisplayResponse
@icewind1991 @oparoz as we discussed in Stuttgart.
This would be the basis for an abstraced simple FS where we can store avatars, previews and maybe other stuff.
Basically it allows for a very simple fs like
So the root contains folders (and only folders). And a folder contains files (and only files).
This will allow us to split creating of avatar/previews from storing/serving them.
As a first implementation we could just use a folder in #136 for example.
Comments/suggestions are welcome.