-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can savemedia be hacked to use 'files' instead of 'media' ? #94
Comments
The savemedia mechanism is through browser download, and uses 'media' as a subdir to the location of the tiddlywiki in use, therefore it is not possible to use the save with nodejs. |
You misunderstand my intent. I know you can't use it with node.js. But node.js and Bob use "files". So you could download your files using media save and then later, in another session, use it with node.js or Bob. It would just work better if everyone used the same subdir for external files. |
Ok I now understand. The subdir is hardcoded in the csaver macro in tiddler the most obvious change would be to have a configuration file e.g var subdir = however not all characters are allowed in a directory name and this varies with system. We could restrict the subdirectory to be subdir=(subdir.match(/^[0-9 a-z]+$/))?subdir:"media"; what do you think? |
To be clear tiddlyclip can be used with nodejs or any other file server, it is just local saving of clips that is different. |
the config would better be |
is it 'Files' or 'files'? |
Having a configuration for it would be the best. Perhaps there could be a warning about what language sets can be used. |
At present I am not going to handle different languages. There needs to be a global setting of the subdir, which will be the setting for all tiddlywikis, but this should be overridden by a setting in individual tiddlywikis. Therefore there need to be a config here in the tiddlyclip plugin (local setting) and a config page created in the savemedia download (global setting). In both places the only options will be 'files' or 'media'. |
Can this config option be added to the tiddlyclip plug in and savemedia add on |
I plan to implement this, but, as I am not planning to use this new feature, it is not high on my list of things to do. |
It's for compatibility with the file upload plug in which might get into the core in the future |
I would like this feature to be added along with the save media addon configuration option (for download location or the saving folder). This is mainly for compatibility when wiki is used in node.js mode and if files upload plug in is also used along with it. Again this is important to me since I am using relative path for displaying images within my wiki. |
I have added a config tiddler to enable 'files' or 'media' to be selected. |
I replaced this with the savetofiles macro |
$:/plugin/bj/savemedia/useFilesDir is available in the latest pre-release. savetofiles macro is the same as csaver macro. |
What's the use of this config tiddler. I can see that in my wiki. How to make use of it? I guess I know how to use the savetofile macro..I will do some testing with it. |
if $:/plugin/bj/savemedia/useFilesDir contains 'yes' then csaver puts clips into 'files' subdir, otherwise it puts them into 'media' subdir |
'Files' is used by the node.js server, and by (I think) Bob.
The text was updated successfully, but these errors were encountered: