Filters not consistently catching images

59 views
Skip to first unread message

kodomohimari

unread,
Sep 4, 2017, 5:07:11 PM9/4/17
to TiddlyWiki
Soo, started experimenting with my installation (TiddlyWiki on NodeJS on a Raspberry Pi accessible through its external IP). Since I work with images a lot, I decided to try setting a filter up to have their tiddlers exist within a single folder (instead of all over the place) using this concept: http://tiddlywiki.com/#Customising%20Tiddler%20File%20Naming.

My code for the file named "$:/config/FileSystemPaths" is below:

[type[image/jpg]addprefix[images/]]
[type[image/jpeg]addprefix[images/]]
[type[image/png]addprefix[images/]]
[type[image/gif]addprefix[images/]]
[type[image/x-icon]addprefix[images/]]
[type[image/svg+xml]addprefix[images/]]

It works... but only partially, which is unnerving. Some .JPG images apparently aren't caught in the filter at all upon importing, and their files and metadata land in the tiddlers/ folder (instead of tiddlers/image/ folder). I'm not sure what makes them different from the other images that do get caught in the filter (regardless of whether they're caught, they do appear as image/jpeg when examined through TiddlyWiki).

Is there any known reason why the filters might fail for some images, but not for others?

(Just for the sake of data: one image that doesn't trip the filter is called IMG_0650.JPG, another that does trip it is called IMG_0637.JPG - so as far as I can tell this isn't just a matter of filename.)

As a sidenote, is there any way to apply filters retroactively? For instance, if I create a tag called "map" and apply to a bunch of already imported images (or even just tiddlers), can I then apply a filter to move the tiddlers with that tag to a tiddlers/map/ folder?

RichardWilliamSmith

unread,
Sep 6, 2017, 3:20:42 AM9/6/17
to TiddlyWiki
Obvious question but are you sure they all have a value for the type field?

kodomohimari

unread,
Sep 6, 2017, 3:59:09 AM9/6/17
to TiddlyWiki
... Well, actually, I just tried again with the same files (including one of the file I knew to not be caught by the filters) and it worked fine. I can't reproduce the error, every image lands where it ought to.

I think I rebooted the server a couple times since last post, so I'm going to assume it was just a weird issue of filter propagation or something. For the time being, problem solved (probably by rebooting).

Thanks for looking into this.

Reply all
Reply to author
Forward
0 new messages