Treat .ngff.source as .ngff/.zarr in upload#1077
Conversation
Co-authored-by: John T. Wodder II <jwodder@users.noreply.github.com>
8478e3f to
d24c826
Compare
| else: | ||
| for fileclass in LocalFileAsset.__subclasses__(): | ||
| if filepath.suffix in fileclass.EXTENSIONS: | ||
| if has_suffixes(filepath.suffix, fileclass.EXTENSIONS): |
There was a problem hiding this comment.
Are you sure we want, say, foo.nwb.bar to be treated as an NWB?
There was a problem hiding this comment.
yeah, good point and sounds odd... might cause all kinds of side-effects for some ad-hoc compressed files etc. May be this entire PR is not worth it since case was quite ad-hoc.
WDYT @satra -- should we treat some .zarr.source/ as a Zarr or let's forget about that?
Co-authored-by: John T. Wodder II <jwodder@users.noreply.github.com>
Co-authored-by: John T. Wodder II <jwodder@users.noreply.github.com>
|
those are indeed mistakes in upload the source folders shouldn't have gone out. i've alerted folks. |
well , the question is what should we do to prevent "hammer effect" of such user mistakes? because now it would have lead to upload of each and one of those files as a separate asset, thus populating 100k assets in the DB. It should survive but clearly not a pleasant thing to do if could be avoided... I think this PR we can just close, but let's continue on that question in #1079 |
Alerted to by @jwodder in #1071 (comment) . Added a helper
has_suffixes.