Browse files

Used a text input for wiki dump import file selection.

Using an HTML "file" input was confusing (as reported by promocore on
YaCy forum : ,
and it only worked with MS IE/Edge on a local YaCy peer :
 - for security reasons some current major browsers such as Firefox or
Chrome do not allow to send full file path information when using a file
form input
 - the local file system selection popup doesn't make sense when you
want to import a dump on a remote YaCy server
  • Loading branch information...
luccioman committed Apr 11, 2017
1 parent 3a71430 commit dfe8d4139b51b7ee6911e45d9d052676d45a507d
Showing with 15 additions and 12 deletions.
  1. +15 −12 htroot/IndexImportMediawiki_p.html
@@ -1,5 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "">
<html xmlns="">
<!DOCTYPE html>
<html lang="en">
<title>YaCy '#[clientname]#': MediaWiki Dump Import</title>
@@ -14,23 +14,26 @@ <h2>MediaWiki Dump Import</h2>
<p>#(status)#No import thread is running, you can start a new thread here::Bad input data: #[message]# #(/status)#</p>
<form action="IndexImportMediawiki_p.html" method="get" accept-charset="UTF-8">
<!-- no post method here, we don't want to transmit the whole file, only the path-->
<form action="IndexImportMediawiki_p.html" method="post" accept-charset="UTF-8" class="form-horizontal">
<legend>MediaWiki Dump File Selection: select an XML file (which may be bz2- or gz-encoded)</legend>
You can import MediaWiki dumps here. An example is the file
<a href=""></a>.
<br />
Dumps must be stored in the local file system in XML format and may be compressed in gz or bz2.
<br />
<div class="input-group">
<span style="display: inline-block">
<input name="file" style="" type="file" value="" size="75" /></span>
<div class="btn-group">
<input name="submit" class="btn btn-primary" type="submit" value="Import MediaWiki Dump" />
<div class="form-group">
<div class="col-sm-3 col-md-2 col-lg-2">
<label for="file" class="control-label" >Dump file path</label>
<div class="col-sm-9 col-md-8 col-lg-8">
<input id="file" class="form-control" name="file" type="text" title="Dump file path on this YaCy server file system" required="required"/>
<input name="submit" class="btn btn-primary" type="submit" value="Import MediaWiki Dump" />

0 comments on commit dfe8d41

Please sign in to comment.