tator icon indicating copy to clipboard operation
tator copied to clipboard

Nested folder structure

Open jrtcppv opened this issue 2 years ago • 4 comments

This issue is to allow for media to have a nested folder structure just like a filesystem. This could be implemented by expanding or replacing the Section objects with an Ltree object. Combined with #374, this could allow for preserving on-disk directory structure when doing directory uploads.

jrtcppv avatar Feb 08 '23 01:02 jrtcppv

Just to add some clarifying comments on LTREE. The usage could replace the section name with an LTREE or add an LTREE field to the Section table. Lookups and navigation could be done via the LTREE field with indirect association to media objects via the current uuid association.

#Psuedo code: (likely actually requiring some Q object shenanigans) 
s = Section.objects.filter(ltree_fancy_lookup)
media = Media.objects.filter(attributes->section_uuid__in=s.values('uuid'))

bctcvai avatar Feb 08 '23 14:02 bctcvai

Docs to LTREE for reference: https://www.postgresql.org/docs/current/ltree.html

bctcvai avatar Feb 08 '23 14:02 bctcvai

Backend only for 1.2

bctcvai avatar Feb 15 '23 19:02 bctcvai

Removed the tag for migration as its already been taken care of

bctcvai avatar Mar 25 '24 13:03 bctcvai

Closed with 0ec12422a5b9080b0fd27a51d749b607841bf30e

marktaipan-cvisionai avatar Apr 16 '24 19:04 marktaipan-cvisionai