View Issue Details
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0003783||Composr||galleries||public||2019-02-27 18:10||2019-02-27 19:29|
|Reporter||Chris Graham||Assigned To|
|Fixed in Version|
|Summary||0003783: Import from filesystem|
|Description||Allow importing galleries from an on-disk directory structure, just like we currently support for the downloads system.|
|Tags||No tags attached.|
|Time estimation (hours)||4|
Actually on discussing this (https://compo.sr/forum/topicview/browse/deploying/installer-fails-to.htm?post_id=5672&topic_id=1310×tamp=1551294888&redirected=1#post_5672) I can see some system that does this dynamically would be better. People aren't going to want to import media libraries and then stop editing filesystem structure.
A better way to do it would be to implement some kind of scanner hook system. When you go to a gallery, it may be bound to a directory path based on a hook's determination. That would then rebuild that gallery based on disk contents. Any images/videos that no longer existed would be unvalidated. Any images/videos that previously existed would be re-validated. This way comments would persist. Depending on exactly how the hook was written, we might migrate old image/video entries to a new gallery, if we detect a file has moved.
We could ship a default hook with some inbuilt assumptions.
Some kind of proxying script may also be needed, if the bound directory is not web accessible.
Possibly we'd do this for galleries too, in addition, or instead of, the import process.