--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/05e40971-35d4-42ca-9848-c1a0db326774%40googlegroups.com.
-- pictures
-- myWIki
-- -- tiddlywiki.info
-- -- tiddlers
-- -- -- images
-- -- -- -- tiddlywiki.files "directories": [
{
"path": "../../../pictures",
"filesRegExp": "^.*\\.jpg$",
"isTiddlerFile": false,
"fields": {
"title": {"source": "basename-uri-decoded"},
"created": {"source": "created"},
"modified": {"source": "modified"},
"type": "image/jpeg",
"tags": ["$:/tags/AttachedFile"],
"text": "",
"_canonical_uri": {"source": "filename", "prefix": "pictures/"}
}
}
]
}
files of the wiki folder will be available via the route \files\<uri-encoded-filename>. For example: http://127.0.0.1:8080/files/Motovun%20Jack.jpgThis can be useful for publishing large files that you don't want to incorporate into the main wiki (PDFs, videos, large images, etc.)."
https://tiddlywiki.com/#Using%20the%20integrated%20static%20file%20server
okay my commute home brought some revelation. The nodejs server isn't limited by what files it can server but by where it can serve files from. So it can not serve files from outside the tiddler folder or a subdirectory of it. As the static file page referenced by Saq indicates, if given the address localhost:8080/images/image.jpg the nodejs server will only look in a subdirectory of the tiddler folder called images. Even though the tiddlywiki.files tells the server the files are outside the directory, the address it is giving points to a subdirectory inside the tiddler directory and the files are not there. AFAIK there isn't any way to point it to outside of the tiddler directory to serve the file.
(e.g. testWiki.html)
(e.g. myWiki) [The description here tested on Windows 10 + Tiddlywiki 5.1.22 + Node.js 12.13.1)
NO tiddlywiki.files is used here
files work as abovepictures inside wikifolder [NOT WORK]to be completed ....
On Monday, March 9, 2020 at 1:15:44 PM UTC+1, Donald Coates wrote:okay my commute home brought some revelation. The nodejs server isn't limited by what files it can server but by where it can serve files from. So it can not serve files from outside the tiddler folder or a subdirectory of it. As the static file page referenced by Saq indicates, if given the address localhost:8080/images/image.jpg the nodejs server will only look in a subdirectory of the tiddler folder called images. Even though the tiddlywiki.files tells the server the files are outside the directory, the address it is giving points to a subdirectory inside the tiddler directory and the files are not there. AFAIK there isn't any way to point it to outside of the tiddler directory to serve the file.This is my understanding as well. Regardless of the fact that tiddlywiki.files can "load" files from other paths, if you want to serve a static file using the node.js server it needs to be in the "files" subfolder of the wiki folder. In addition, the "images" subfolder is probably also supported as it is mentioned here: https://tiddlywiki.com/#ExternalImages
In other words, there is a different logic for what files can be "loaded" via tiddlywiki.files versus what static file paths can be served by the integrated static file server.
{
"directories": [
{
"path": "./",
"filesRegExp": "^.*\\.(jpg|png|jpeg)$",
"isTiddlerFile": false,
"fields": {
"tags": ["vacation"]
}
]
}