Discussion:
[tw5] Feature request - canonical uri button.
Zachary Storer
2018-05-15 23:32:08 UTC
Hello,

I wish that there was a more intelligent [import] button that could link to
external images without the need
for manually inserting the _canonical_uri field. This is a feature
request(?). I don't know how difficult it would
be to add this. Perhaps I can learn some JavaScript and make a plugin for
it, or perhaps there already is a plugin?

-

Zak
--
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 post to this group, send email to ***@googlegroups.com.
TonyM
2018-05-16 02:09:06 UTC
On Further thought,

What if we had a button to insert file/folder addresses of any kind into a
named field. Ideally it would allow a file spec such as *.jpg *.png as well.
Then a variation of this button (preset variables) before Calling the
button would give the one you ask for.

However I can be used elsewhere.

Regards
Tony
Post by Zachary Storer
Hello,
I wish that there was a more intelligent [import] button that could link
to external images without the need
for manually inserting the _canonical_uri field. This is a feature
request(?). I don't know how difficult it would
be to add this. Perhaps I can learn some JavaScript and make a plugin for
it, or perhaps there already is a plugin?
-
Zak
--
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 post to this group, send email to ***@googlegroups.com.
TonyM
2018-05-16 02:06:07 UTC
Zak,

Good idea, perhaps we could stop describing it in such obscure technical
terms.

Eg the "External Image Address" is stored in the _canonical_uri of a
tiddler.

Regards
Tony
Post by Zachary Storer
Hello,
I wish that there was a more intelligent [import] button that could link
to external images without the need
for manually inserting the _canonical_uri field. This is a feature
request(?). I don't know how difficult it would
be to add this. Perhaps I can learn some JavaScript and make a plugin for
it, or perhaps there already is a plugin?
-
Zak
--
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 post to this group, send email to ***@googlegroups.com.
'Mark S.' via TiddlyWiki
2018-05-16 02:46:11 UTC
We've been told that the full path is unavailable, and that's why it can't
make an external link on the fly.

It seems to me that TW must have available the plain file name. So if you
could provide the path to the file via a configuration tiddler, then a
complete uri could be formed. Maybe could overwrite the existing "import"
button (the one you see after the drag-n-drop) so that it creates a
canonical uri tiddler rather than actually importing the source.

-- Mark
Post by Zachary Storer
Hello,
I wish that there was a more intelligent [import] button that could link
to external images without the need
for manually inserting the _canonical_uri field. This is a feature
request(?). I don't know how difficult it would
be to add this. Perhaps I can learn some JavaScript and make a plugin for
it, or perhaps there already is a plugin?
-
Zak
--
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 post to this group, send email to ***@googlegroups.com.
TonyM
2018-05-16 03:54:17 UTC
Mark,

I would not be surprised if pointing only supplied part of the path and or
only the filename as you say.

Good idea enhancing the import screen, so drag and drop work as well.

If the user provides the source folder name to one field eg; \images then
the file open dialogue selects the filename from said path then selecting
the filename is sufficient to build the relative path \images\52346346.jpg

This would be further enhanced if we can use the Operating systems Preview
features to help select the correct image file.

It does not seem to be rocket science to simplify the process as much as
possible. If we just and try and attach an image we quickly see the
opportunities available to make this easy even in the face of impediments.

Thanks
Tony
--
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 post to this group, send email to ***@googlegroups.com.
Zachary Storer
2018-05-23 16:15:54 UTC
Should I add a feature request for this on GitHub?
Post by TonyM
Mark,
I would not be surprised if pointing only supplied part of the path and or
only the filename as you say.
Good idea enhancing the import screen, so drag and drop work as well.
If the user provides the source folder name to one field eg; \images then
the file open dialogue selects the filename from said path then selecting
the filename is sufficient to build the relative path \images\52346346.jpg
This would be further enhanced if we can use the Operating systems Preview
features to help select the correct image file.
It does not seem to be rocket science to simplify the process as much as
possible. If we just and try and attach an image we quickly see the
opportunities available to make this easy even in the face of impediments.
Thanks
Tony
--
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 post to this group, send email to ***@googlegroups.com.
Mat
2018-05-23 16:32:34 UTC
Hi all, I posted this closely related issue on github some time ago. Please
go there and support it.

Sniff file ext to infer type for _canonical_uri tids
<https://github.com/Jermolene/TiddlyWiki5/issues/3034>

<:-)
--
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 post to this group, send email to ***@googlegroups.com.
Ste Wilson
2018-05-23 17:19:54 UTC
in my role as the village idiot....
What is a canonical URI? Who is Uri?
--
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 post to this group, send email to ***@googlegroups.com.
'Mark S.' via TiddlyWiki
2018-05-23 17:39:18 UTC
Uri is the guy in charge of the TW cannon works. Whenever the unicorns
start to stampede the tiddlers, he comes out and fires on them. It's quite
a sight.

Just as described in the docs:

https://tiddlywiki.com/#ExternalImages

HTH
-- Mark
Post by Ste Wilson
in my role as the village idiot....
What is a canonical URI? Who is Uri?
--
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 post to this group, send email to ***@googlegroups.com.
Ste Wilson
2018-05-24 10:10:26 UTC
Cheers Mark S for the explanation :D

So... I've been embedding external images with
[img[http://url.svg]]

But I could do this with canons and uri?

What are the advantages as, having had a look at the documentation, I'm still not massively clear...
--
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 post to this group, send email to ***@googlegroups.com.
@TiddlyTweeter
2018-05-24 11:43:06 UTC
Post by Ste Wilson
What are the advantages as, having had a look at the documentation, I'm
still not massively clear...
On this, even if you are (Y)uri and clad according to Catholic Canon Law,
you are in good company.

If you look back over the Google Marshes, you will see that how to handle
images is one of the most recurrent questions and confusions.

Its NOT TW can't do it. It can do it well in a few different ways. Plus,
additional complications arise because the server version (Tiddlers as
".tid") requires a specific method for external image handling.

I think the variant situations, even in basic setups, is already quite

This is one area of documentation where someone who has a full overview
could help us all by giving slightly more detailed notes and examples of
the variant methods of instantiating imagery even at the out-of-the-box
level.

Just MO
Josiah
--
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 post to this group, send email to ***@googlegroups.com.
'Mark S.' via TiddlyWiki
2018-05-24 20:35:59 UTC
The main advantage, and it's kind of weak, is that if you use the image in
multiple places, but then need to change the directory, you will only have
to change the one canonical URI address.

It's weak, because you can do much more with macros. With a macro and a
configuration tiddler, you can change your image path depending on your
platform. This is useful if you can't use a relative path on some platform.
directory for saving on an internal drive with limited space, but all your
images are off on a sdcard where there is more space. Likewise, switching
between Linux and Windows where the file pathing is completely different.
The problem with macros is that they're not part of the standard core, and
"MyFavoriteFossaImage.jpg">>.

It would be great if all internal image links referenced a base image path
configuration tiddler. Then you wouldn't have to use a macro to display
images in a flexible manner. I suppose that would be a fun parser rework
project.

-- Mark
Post by Ste Wilson
Cheers Mark S for the explanation :D
So... I've been embedding external images with
[img[http://url.svg]]
But I could do this with canons and uri?
What are the advantages as, having had a look at the documentation, I'm
still not massively clear...
--
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 post to this group, send email to ***@googlegroups.com.
s***@gmail.com
2018-05-23 20:40:26 UTC
Hi,
Post by Zachary Storer
I wish that there was a more intelligent [import] button that could link
to external images without the need
for manually inserting the _canonical_uri field.
With the following code, a JPEG image from a web location can be dragged
into an area marked "Drop JPEG Image Here", and a tiddler containing the
_canonical_uri of the image is automatically created:

\define embedded-image-actions()
<$wikify name="tiddlercontent2" mode="inline" text='<<actionTiddler>>'> <$action-createtiddler $basetitle="New Image" _canonical_uri=<<tiddlercontent2>> type="image/jpeg"$savetitle="Embed
JPEG!!tiddlertitle"/>
<$action-navigate$to={{Embed JPEG!!tiddlertitle}}/>
</$wikify> \end <$droppable actions=<<embedded-image-actions>>>
<div style="height:2em;">
<div style="border:1px dotted;
Image Here</div></div>
</$droppable> Downside: I believe that a separate tiddler/drop area needs to be created for other image types, e.g. PNG. Cheers, Stef -- 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 post to this group, send email to ***@googlegroups.com. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/3d97a7b5-58bc-4833-88dd-8f4fbf12bd00%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. BurningTreeC 2018-05-23 20:50:23 UTC Permalink Post by s***@gmail.com With the following code, a JPEG image from a web location can be dragged into an area marked "Drop JPEG Image Here", and a tiddler containing the \define embedded-image-actions() <$wikify name="tiddlercontent2" mode="inline" text='<<actionTiddler>>'>
<$action-createtiddler$basetitle="New Image"
_canonical_uri=<<tiddlercontent2>> type="image/jpeg" $savetitle="Embed JPEG!!tiddlertitle"/> <$action-navigate $to={{Embed JPEG!!tiddlertitle}}/> </$wikify>
\end
<droppable actions=<<embedded-image-actions>>> <div style="height:2em;"> <div style="border:1px dotted; width:15em;padding:0.7em;border-radius:5px;text-align:center;">Drop JPEG Image Here</div></div> </droppable>
Hi @Stef ,

I believe this could make it work for more types:

\define embedded-image-actions()
<$wikify name="tiddlercontent2" mode="inline" text='<<actionTiddler>>'> <$vars imageType={{{ [<tiddlercontent2>>suffix[.jpg]addprefix[image/jpeg]
image/jpeg]removesuffix<tiddlercontent2>][<tiddlercontent2>>suffix[.png]
<$action-createtiddler$basetitle="New Image" _canonical_uri=<<
tiddlercontent2>> type=<<imageType>> $savetitle="Embed JPEG!!tiddlertitle" /> <$action-navigate $to={{Embed JPEG!!tiddlertitle}}/> </$vars>
</$wikify> \end <$droppable actions=<<embedded-image-actions>>>
<div style="height:2em;">
</$droppable> -- 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 post to this group, send email to ***@googlegroups.com. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/3ea884a4-d943-4a80-9d78-f7d821a25206%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. s***@gmail.com 2018-05-24 20:23:20 UTC Permalink Hi, Your code looks promising. However, it doesn't seem to work for me. When I try to import a .jpg image, no image type is detected, and I get the following error: Trying to load external content from [URL] If this message doesn't disappear, either the tiddler content type doesn't match the type of the external content, or you may be using a browser that doesn't support external content for wikis loaded as standalone files. See https://tiddlywiki.com/#ExternalText <https://tiddlywiki.com/#ExternalText> Also, I'm not sure what to do about URLs that end e.g. like this: .png&f=1 (DuckDuckGo creates such URLs) On the other hand, TiddlyWiki seems to render .png or .svg images properly even if I import them with the content type "image/jpeg". (I had tried to post this before, including the URLs of the images from Flickr and Wikipedia which I used, but my post was deleted - I guess I inadvertedly violated some forum rules by including the links.) ~Stef -- 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 post to this group, send email to ***@googlegroups.com. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/4135970e-c399-4ec5-9003-5d0d6ece8560%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. s***@gmail.com 2018-05-24 20:06:07 UTC Permalink Hi Your modification looks promising. However, it doesn't seem to work for me. I tried to import the picture of a familiar cat: Loading Image... Unfortunately, no content type was detected, and TiddlyWiki threw the following error: Trying to load external content from https://c1.staticflickr.com/7/6217/6292279493_0824a351d7_b.jpg If this message doesn't disappear, either the tiddler content type doesn't match the type of the external content, or you may be using a browser that doesn't support external content for wikis loaded as standalone files. See https://tiddlywiki.com/#ExternalText Furthermore, I'm not sure what to do about URLs like this (created by DuckDuckGo): Loading Image...&f=1 On the other hand, TiddlyWiki seems to render .png or .svg images properly even if I import them with the content type "image/jpeg". ~Stef -- 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 post to this group, send email to ***@googlegroups.com. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/93f239eb-3751-4f14-be11-c64e9228334e%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. 'Mark S.' via TiddlyWiki 2018-05-23 22:22:35 UTC Permalink Neat. Hmmm. I guess if you know that you're always dragging/dropping from a particular path then you could strip off one prefix and add another. That allows you to create a relative path _canoncal_uri tiddler. Like this (for just the macro part of your code) : \define embedded-image-actions() <$set name="tiddlercontent2" mode="inline" filter=
<$action-createtiddler$basetitle="New Image" _canonical_uri=<<
tiddlercontent2>> type="image/jpeg" $savetitle="Embed JPEG!!tiddlertitle"/> <$action-navigate $to={{Embed JPEG!!tiddlertitle}}/> </$set>
\end

This lets you drag and drop from a local directory (browsed in your
browser) into a local tw and instantly create a _canonical_uri tiddler. The
only thing that would be better is if you could drag from explorer or some
other file browser.

Thanks!
Mark
Post by s***@gmail.com
Hi,
Post by Zachary Storer
I wish that there was a more intelligent [import] button that could link
to external images without the need
for manually inserting the _canonical_uri field.
With the following code, a JPEG image from a web location can be dragged
into an area marked "Drop JPEG Image Here", and a tiddler containing the
\define embedded-image-actions()
<$wikify name="tiddlercontent2" mode="inline" text='<<actionTiddler>>'> <$action-createtiddler $basetitle="New Image" _canonical_uri=<<tiddlercontent2>> type="image/jpeg"$savetitle="Embed
JPEG!!tiddlertitle"/>
<$action-navigate$to={{Embed JPEG!!tiddlertitle}}/>
</$wikify> \end <$droppable actions=<<embedded-image-actions>>>
<div style="height:2em;">
<div style="border:1px dotted;
Image Here</div></div>
</$droppable> Downside: I believe that a separate tiddler/drop area needs to be created for other image types, e.g. PNG. Cheers, Stef -- 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 post to this group, send email to ***@googlegroups.com. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/3a6881c1-f65f-477c-92aa-e943ece9d8dd%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. Mat 2018-05-24 06:47:20 UTC Permalink Regarding these latter code samples; Maybe there can be a list of the various image types, and other file types for that matter, which some listwidget runs through as part of the actions? (The list could be e.g in a dictionary). <:-) -- 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 post to this group, send email to ***@googlegroups.com. Visit this group at https://groups.google.com/group/tiddlywiki. To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/79d5a5b8-7c8e-44e1-8c75-324d83c1696f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. s***@gmail.com 2018-05-25 20:59:59 UTC Permalink Post by s***@gmail.com Downside: I believe that a separate tiddler/drop area needs to be created for other image types, e.g. PNG. Here is an updated version of my code which allows users to pre-select a file type (GIF, JPEG, PNG or SVG) before importing an image: \define embedded-image-actions() <$wikify name="tiddlercontent2" mode="inline" text='<<actionTiddler>>'>
<$action-createtiddler$basetitle="New Image" _canonical_uri=<<
tiddlercontent2>> type={{Embed Image}} $savetitle="Embed Image!!tiddlertitle"/> <$action-navigate $to={{Embed Image!!tiddlertitle}}/> </$wikify>
\end

<droppable actions=<<embedded-image-actions>>> <div style="float:left;margin-right:1em;"> <div style="border:1px dotted; width:15em;padding:0.8em;border-radius:5px;text-align:center;">Drop image (<list filter="[[Embed
Image]get[text]]+[removeprefix[image/]]">{{!!title}}</$list>) here</div></ div> </$droppable>
<div style="height:2.5em;">
Image type: <br/>
<$select tiddler='Embed Image'> <option value='image/gif'>GIF</option> <option value='image/jpeg'>JPEG</option> <option value='image/png'>PNG</option> <option value='image/svg+xml'>SVG</option> </$select></div>

Of course, automatic detection would be preferable.

Cheers,

Stef
--
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 post to this group, send email to ***@googlegroups.com.
Zachary Storer
2018-08-06 23:24:52 UTC
Any progress with this?
Post by s***@gmail.com
Post by s***@gmail.com
Downside: I believe that a separate tiddler/drop area needs to be created
for other image types, e.g. PNG.
Here is an updated version of my code which allows users to pre-select a
\define embedded-image-actions()
<$wikify name="tiddlercontent2" mode="inline" text='<<actionTiddler>>'> <$action-createtiddler $basetitle="New Image" _canonical_uri=<< tiddlercontent2>> type={{Embed Image}}$savetitle="Embed
Image!!tiddlertitle"/>
<$action-navigate$to={{Embed Image!!tiddlertitle}}/>
</$wikify> \end <$droppable actions=<<embedded-image-actions>>>
<div style="float:left;margin-right:1em;">
<div style="border:1px dotted;
(<$list filter="[[Embed Image]get[text]]+[removeprefix[image/]]">{{!!title}}</$list>) here</div></
div>
</$droppable> <div style="height:2.5em;"> Image type: <br/> <$select tiddler='Embed Image'>
<option value='image/gif'>GIF</option>
<option value='image/jpeg'>JPEG</option>
<option value='image/png'>PNG</option>
<option value='image/svg+xml'>SVG</option>
</\$select></div>
Of course, automatic detection would be preferable.
Cheers,
Stef
--
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 post to this group, send email to ***@googlegroups.com.
TonyM
2018-05-24 00:33:48 UTC
This thread is moving somewhere useful, using alternate Drop Zones for
different responses to drag and drop.

If I may make a small brain dump for consideration.

I do not yet have the skills to do so but it seems to me we need to
generalise this somewhat. You could think of it as providing a drop zone
for a number of importers that respond differently. Alternatively and even
better would be if we could open a drop importer in its own window, so that
onscreen we place this window next to our filemanger to collect and import
all the files we want, if necessary supplying the folder path seperately.

Personally I can imagine opening a tiddler full screen perhaps called the
drop importer which would have a number of coloured tiles with the
different importer methods as the title. Including custom importers such as
anything you drop here will be tagged foo as well as imported. The
importers could simply import a link, create the canonical URI, drop the
filename only, import the item by filetype etc... A custom value would
allow one to specify a path eg; /images such that if one drags a set of
filenames into tiddlywiki it will import the filename such that it can be
combined with the path to point to the file(s) folder. This requires the
files are intentionally placed in the /images folder by the user but this
is trivial to not being able to drop references to the files in tiddlywiki
(or has this already being solved?)

Every drop importer should have a matching Importer for the Import button
as well, and being able to set a filter for the files you can select say to
"images only" would be helpful to make it clear what can be imported via
that importer.

I would like to create importers to drag and drop say .bat and .cmd files
and have them tagged WindowsBatch for example. Or .php files, tagged
wordPressPHP

Further, I have raised the use of iFrames for inter Wiki tiddler transfer
It would great if such importers would include dropzones that are in fact
windows to other wikis so lets say I dropped a plugin into an importer
called "CorePlugins" the plugin would effectively be dropped on the
External Wiki called "CorePlugins"which is my plugin repository, if we
could only have the target wiki not ask to confirm import this would be
helpful (but not essential). Even better would be an importer that imports
the plugin here and into CorePlugins in one step.

Another type that would be helpful is to select a folder name and or path
(if Possible) to save in a tiddler. Whilst this could be used to say set
the images location it could also be used to point to a folder containing
other wikis, or to a wiki file itself.

Also as you may guess I would think every importer should have a matching
exporter. I would love to be able to provide a button that exports a .bat
.cmd .php file as a .bat .cmd or .php file. Thus TiddlyWiki can be an
integrated tool for documenting and generating scripts in multiple formats,
especially where the content is effectively plain-text. For the security
concerned remember I have to use the interactive export/save dialogue so
such files can not be installed surreptitiously. However allowing
(sometimes small) executables would also be helpful, so that tiddlywiki
could become an interactive set up and install platform. Imagine if
TiddlyServers settings.json could be automated in tiddlywiki with the
result exported (Jed does something like this in Bob).

I believe there are no technical limitations to getting the above, only a
need for a clarity of purpose.

Regards
Tony
Post by Zachary Storer
Hello,
I wish that there was a more intelligent [import] button that could link
to external images without the need
for manually inserting the _canonical_uri field. This is a feature
request(?). I don't know how difficult it would
be to add this. Perhaps I can learn some JavaScript and make a plugin for
it, or perhaps there already is a plugin?
-
Zak
--
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 post to this group, send email to ***@googlegroups.com.
Jed Carty
2018-08-07 07:37:53 UTC
Zak,

There are security restrictions on browsers that prevent the browser from
knowing the full path to local files. There isn't currently any way around
this and if anyone found a way it would probably be patched quickly. I made
the ServerImages plugin (https://github.com/OokTech/TW5-ServerImages) but
it is very limited. It assumes that any media file imported is in a known
folder and instead of importing the media file creates a tiddler with a
_canonical_uri field pointing to that folder.

But it prevents you from being able to import media files normally and if
you change the folder or have the file somewhere other than that one folder
it won't work. And I don't know if it will work without Bob because you
need to have a server serving the files.
--
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 post to this group, send email to ***@googlegroups.com.
TonyM
2018-08-07 08:09:43 UTC
Jed,

Just a thought.

If I am running tiddlywiki locally I can always get a full local filepath
and save it in TiddlyWiki in a tiddler. I could even build a way to import
the whole folder tree and import it to tiddlywiki.

Once these folders are known in tiddlywiki I could do a lot of stuff. Its
seems that while browsers now limit the process in the browser that
collects such foldernames, such that if it were compromised It can not be
used to access systems files etc... However surely we have the "right" to
provide a given wiki with that data? and then use that data as we need?

The browser can surely know this because we provide it with the folder
names by our own means?

Regards
Tony
Post by Jed Carty
Zak,
There are security restrictions on browsers that prevent the browser from
knowing the full path to local files. There isn't currently any way around
this and if anyone found a way it would probably be patched quickly. I made
the ServerImages plugin (https://github.com/OokTech/TW5-ServerImages) but
it is very limited. It assumes that any media file imported is in a known
folder and instead of importing the media file creates a tiddler with a
_canonical_uri field pointing to that folder.
But it prevents you from being able to import media files normally and if
you change the folder or have the file somewhere other than that one folder
it won't work. And I don't know if it will work without Bob because you
need to have a server serving the files.
--
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 post to this group, send email to ***@googlegroups.com.
Jed Carty
2018-08-07 08:22:02 UTC
Tony,

The browser can know whatever you tell it yes, but when you drag and drop a
file into the browser or import it another way the browser only gets the
file name, not the path. You can give the browser the path if you want, but
you have to do it manually that is how _canonical_uri fields work. So you
can list all the folders you want in tiddlywiki, but it doesn't have a way
to automatically associate a folder with an imported file.

And if you are going to talk about 'rights' of the browser vs the person
using the browser in this context, the adversarial model used by browsers
has a lot of problems, not as many as that of phone OS's, but there are
plenty of problems. DRM and adtech are two big reasons but that is
something that I shouldn't rant about here.
--
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 post to this group, send email to ***@googlegroups.com.
TonyM
2018-08-07 09:07:10 UTC
Jed,

I understand that limitation, but once we have "manually" provided those
folders we should be able to browse them and select images and use our own
code to add a field containing the source folder.

I put quotes around "manually" because getting all folder names is like
this in the windows commend prompt "dir /s /ad /b >result.txt" and I am
sure similar on linux. Although we may restrict this to our images/pictures
folders and subfolders in the image case.

Regards
Tony
Post by Jed Carty
Tony,
The browser can know whatever you tell it yes, but when you drag and drop
a file into the browser or import it another way the browser only gets the
file name, not the path. You can give the browser the path if you want, but
you have to do it manually that is how _canonical_uri fields work. So you
can list all the folders you want in tiddlywiki, but it doesn't have a way
to automatically associate a folder with an imported file.
And if you are going to talk about 'rights' of the browser vs the person
using the browser in this context, the adversarial model used by browsers
has a lot of problems, not as many as that of phone OS's, but there are
plenty of problems. DRM and adtech are two big reasons but that is
something that I shouldn't rant about here.
--
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 post to this group, send email to ***@googlegroups.com.