Possible TiddlyServer, node or Bob Feature idea

195 views
Skip to first unread message

TonyM

unread,
Apr 18, 2020, 12:57:53 AM4/18/20
to TiddlyWiki
Jed, Arlen et all,

As mentioned in passing here Bob is now capable of serving files, as is TiddlyServer and Node static tiddlers but what about the reverse at least for a secure environment?

For example a server based drop box, where files can be dropped into a files global or wiki local and further if tid or json import them? Here I am referring to a URL address rather than the local file system, however this should be possible as well.

Regards
Tony


Arlen Beiler

unread,
Apr 18, 2020, 10:59:50 PM4/18/20
to TiddlyWiki
TiddlyServer has this capability. You can upload files and create new directories within directories. You can set the name when you upload it. Currently, if the file exists it will be overwritten. If you cannot see the upload button in the directory index, you are either on a group index (meaning a branch of the tree (group), rather than a "leaf" (folder) so to speak, or it you need to set the upload permission for either localAddressPermission (i.e. the listening IP address) or for the logged in user. The functionality is there but I haven't really documented it well yet.

For TiddlyWiki on Node you would just need to create a plugin to upload to the files directory. I don't think the functionality is built-in currently. It would be great to have a proper upload manager that takes gives you upload status and so forth. That should also work on TiddlyServer. I'd be happy to test it to make sure. I wouldn't be surprised if a plugin already exists but maybe I misunderstood the original intent of the files folder. 



--
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/9448f4ff-af2b-43da-be75-cef2265139fd%40googlegroups.com.

TonyM

unread,
Apr 19, 2020, 12:32:00 AM4/19/20
to TiddlyWiki
Arlen

Thanks I will revisit tiddlyserver for this. I admin I never worked out the login process.

Its technical feasable to save anything out of tiddlywiki changing filters and filenames but seems to be no way to do this as a utility function and directed to an address of any kind.

I will review and respond thanks

Tony

Matthias Bilger

unread,
Apr 22, 2020, 4:26:25 AM4/22/20
to TiddlyWiki
I used to have the same issue, hat a lot of files I wanted to serve, but did want to use just the tiddlywiki node js server.

I run it in docker anyway and I am not too much into JS. So I just added another docker container to my setup which allows uploading files to the files folder for my wiki. I created a minimal tiddler for my sidebar which has an iframe in it to show the upload form.
Using nginx as a reverse proxy does the authentication. 


Mohammad

unread,
Apr 23, 2020, 1:32:49 PM4/23/20
to TiddlyWiki
This is great Mathias!
Thank you for sharing. I see you have also use lazy loading!

Would you mind to share the procedure for get and run your code! I appreciate if give us a step by step procedure!

--Best

Jed Carty

unread,
Apr 23, 2020, 4:02:37 PM4/23/20
to TiddlyWiki
Being able to drop files in Bob to upload them to the server has been a feature for a while. At the moment files go into wiki specific folders and there is a global folder that you can set. Eventually it will be configurable were they go.
Message has been deleted

Saq Imtiaz

unread,
Apr 23, 2020, 5:53:46 PM4/23/20
to tiddl...@googlegroups.com
Arlen: is uploading files to TiddlyServer as simple as doing a POST to a given URL? Or would it need an extra route added to the server for this, as is the case with the default node server?

I'm currently looking into adding the ability to upload files from TiddlyWiki on the built in node server to the files folder, creating a canonical Uri tiddler pointing to each file at the same time.


It would be an extra win if that could work with TiddlyServer as well, as my next step will likely be a better option for multiple wikis than the multiple instances of the tw node server I have running at the moment. 

Saq Imtiaz

unread,
Apr 23, 2020, 5:58:46 PM4/23/20
to TiddlyWiki
Apologies for the semi garbled text of my last post. Using google groups on my phone is being problematic today.

Jed Carty

unread,
Apr 23, 2020, 6:49:43 PM4/23/20
to TiddlyWiki
Saq

bob does exactly that, you could probably take the code almost directly from Bob and make a plugin that would work with the normal node server. It is a server route on the server side and a hook in the browser that detects the import.

Saq Imtiaz

unread,
Apr 23, 2020, 6:51:18 PM4/23/20
to TiddlyWiki
Jed: thank you!! I'll have a look at the Bob source code.

Saq Imtiaz

unread,
Apr 23, 2020, 7:01:23 PM4/23/20
to TiddlyWiki
Jed, looks like I was on the right track but this will save me a fair bit of work. 
For anyone else interested these are the relevant files from Bob:

Server route: https://github.com/OokTech/TW5-Bob/blob/master/ServerRoutes/post-upload.js
Client side hook: https://github.com/OokTech/TW5-ServerImages/blob/master/ServerImages.js

Arlen Beiler

unread,
Apr 23, 2020, 8:37:03 PM4/23/20
to TiddlyWiki
The functionality is already built into TiddlyServer, and it's a standard HTML Form from a folder's directory index. However, all requests relating to data folders are handled by the TiddlyWiki server functions for that data folder, so anything that relates to the files directory or anything else inside a data folder will need to be handled by the TiddlyWiki server directly. I would be glad to make sure this functionality works with TiddlyServer as well, and would also like to get this into the core or a core plugin. Please keep us updated as to your progress on this. I am very keen to see how this turns out. 

Hope it helps,
Arlen

--
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.

Arlen Beiler

unread,
Apr 23, 2020, 8:40:46 PM4/23/20
to TiddlyWiki
In order to get the server route to work properly, you should need to add exports.bodyFormat === "stream"

On Thu, Apr 23, 2020 at 7:01 PM Saq Imtiaz <saq.i...@gmail.com> wrote:
--

Saq Imtiaz

unread,
Apr 24, 2020, 5:15:25 AM4/24/20
to TiddlyWiki
Arlen: priceless tip, thank you. I saw it just as I was starting to want to bash my head against a wall :)

I have an extremely basic working proof of concept - basically a reworking of Jed's code. Needs some thought around UI, workflow etc. Will post to dev group when I get the chance and then hopefully with some discussion, we can iterate towards something more fleshed out.


On Friday, April 24, 2020 at 2:40:46 AM UTC+2, Arlen Beiler wrote:
In order to get the server route to work properly, you should need to add exports.bodyFormat === "stream"

On Thu, Apr 23, 2020 at 7:01 PM Saq Imtiaz <saq....@gmail.com> wrote:
Jed, looks like I was on the right track but this will save me a fair bit of work. 
For anyone else interested these are the relevant files from Bob:

Server route: https://github.com/OokTech/TW5-Bob/blob/master/ServerRoutes/post-upload.js
Client side hook: https://github.com/OokTech/TW5-ServerImages/blob/master/ServerImages.js

On Friday, April 24, 2020 at 12:51:18 AM UTC+2, Saq Imtiaz wrote:
Jed: thank you!! I'll have a look at the Bob source code.

--
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 tiddl...@googlegroups.com.

TonyM

unread,
Apr 24, 2020, 5:40:25 AM4/24/20
to TiddlyWiki
Please post working solutions or a link to a dev discussion in this thread, after all searches will bring up this thread..

Tony.
Reply all
Reply to author
Forward
0 new messages