[tw5] Re: Method to load batch of images/files and externalize in nodejs server

2020-03-09 Thread Donald Coates
Thank you!

On Monday, March 9, 2020 at 10:37:54 AM UTC-4, Mohammad wrote:
>
> Donald,
>  There is a little bracket unbalance!
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3b87295b-a161-4408-aaeb-1fc060dcde94%40googlegroups.com.


[tw5] Re: Method to load batch of images/files and externalize in nodejs server

2020-03-09 Thread Mohammad
Donald,
 There is a little bracket unbalance!

On Monday, March 9, 2020 at 5:43:46 PM UTC+3:30, Donald Coates wrote:
>
> good goddess my ability to overcomplicate is as frightening as it is 
> ridiculous.
>
> The way to do this is to just put all the images in the directory that 
> nginx will be pointing to, lets say images.  Then create a directory in the 
> tiddler directory called loadfiles and put the following tiddlywiki.files 
> in it:
>
> {
> "directories": [
>
> {
> "path": "../../path/to/nginx/dir/relative/to/this/file",
> "filesRegExp": "^.*\\.(jpg|png|jpeg)$",
> "isTiddlerFile": false,
> "fields": {
>"title": {"source": "filename"},
>"type": "image/jpeg",
>"_canonical_uri": {"source": "filename", "prefix": 
> "images/"}
> }
>
} 

>
> ]
> }
>
> When you start/restart the wiki it will build a reference to this 
> directory and point the browser to it with the canonical uri.  No need for 
> all those extra steps.
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/e7eefb46-0ea2-4f61-8ea2-780f67e3ed39%40googlegroups.com.


[tw5] Re: Method to load batch of images/files and externalize in nodejs server

2020-03-09 Thread Donald Coates
good goddess my ability to overcomplicate is as frightening as it is 
ridiculous.

The way to do this is to just put all the images in the directory that 
nginx will be pointing to, lets say images.  Then create a directory in the 
tiddler directory called loadfiles and put the following tiddlywiki.files 
in it:

{
"directories": [

{
"path": "./",
"filesRegExp": "^.*\\.(jpg|png|jpeg)$",
"isTiddlerFile": false,
"fields": {
   "title": {"source": "filename"},
   "type": "image/jpeg",
   "_canonical_uri": {"source": "filename", "prefix": "images/"}
}
]
}

When you start/restart the wiki it will build a reference to this directory 
and point the browser to it with the canonical uri.  No need for all those 
extra steps.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to tiddlywiki+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/95b8bd08-d1c2-4fce-a5b8-efbd6818f445%40googlegroups.com.