Reputation: 15769
The following links and text snippets describe and reference the "uploadable" parameter for field in SMW Forms (hope this is the right issue tracker for this)
Specifies that a link should be placed next to this field, that opens a popup window to let the user upload a file; see "Uploading files", below. See
https://www.mediawiki.org/wiki/Extension:Semantic_Forms/Defining_forms#.27field.27_tag https://www.mediawiki.org/wiki/Extension:Semantic_Forms/Defining_forms#Uploading_files
The type of the target property seems to have to be Page for this to work, there is no special standard datatype for images in:
https://semantic-mediawiki.org/wiki/Help:List_of_datatypes
There are explanations in how this works at:
http://smw.referata.com/wiki/Using_Semantic_Forms_for_file_pages_and_uploads http://discoursedb.org/wiki/Form:Images_test http://discoursedb.org/wiki/Special:FormEdit/Images_test/ImageTest
and there has been a discussion how to handle the "File:" namespace prefix: http://semediawiki-devel.narkive.com/gm7hJMBE/smw-devel-sf-turning-uploadable-into-input-type-upload
Now I assume that at this point the "File:" part is not handled by the uploadable flag (at least not by default).
It would be great to have solution (or if one exists a proper documentation pointer to it) that allows the File: prefix to be added automatically so that the full page description File:someImage is available as the result of "uploadable".
What would be a workaround or solution or pointer to a solution for this?
I have filed a bug report at * https://github.com/SemanticMediaWiki/SemanticMediaWiki/issues/1036 to notify the developers
Upvotes: 0
Views: 72
Reputation: 878
I always use a property of datatype text for storing the file names and I never add the namespace to this property. Thus I can do whatever I like with the stored value in the template which is holding it, i.e. link it to "Media:" or to "File:".
You could e.g. do [[Is file::File:{{{File|}}}]] in the template to add the namespace if you would really like to add the namespace directly.
Upvotes: 1