Used a text input for wiki dump import file selection.

Using an HTML "file" input was confusing (as reported by promocore on
YaCy forum : http://forum.yacy-websuche.de/viewtopic.php?f=5&t=5965) ,
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
pull/60/head^2
luccioman 8 years ago
parent 3a71430030
commit dfe8d4139b

@ -1,5 +1,5 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"> <html lang="en">
<head> <head>
<title>YaCy '#[clientname]#': MediaWiki Dump Import</title> <title>YaCy '#[clientname]#': MediaWiki Dump Import</title>
#%env/templates/metas.template%# #%env/templates/metas.template%#
@ -14,23 +14,26 @@
#(import)# #(import)#
<p>#(status)#No import thread is running, you can start a new thread here::Bad input data: #[message]# #(/status)#</p> <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"> <form action="IndexImportMediawiki_p.html" method="post" accept-charset="UTF-8" class="form-horizontal">
<!-- no post method here, we don't want to transmit the whole file, only the path-->
<fieldset> <fieldset>
<legend>MediaWiki Dump File Selection: select an XML file (which may be bz2- or gz-encoded)</legend> <legend>MediaWiki Dump File Selection: select an XML file (which may be bz2- or gz-encoded)</legend>
<p>
You can import MediaWiki dumps here. An example is the file You can import MediaWiki dumps here. An example is the file
<a href="http://dumps.wikimedia.org/dewiki/latest/dewiki-latest-pages-articles.xml.bz2"> <a href="http://dumps.wikimedia.org/dewiki/latest/dewiki-latest-pages-articles.xml.bz2">
http://dumps.wikimedia.org/dewiki/latest/dewiki-latest-pages-articles.xml.bz2</a>. http://dumps.wikimedia.org/dewiki/latest/dewiki-latest-pages-articles.xml.bz2</a>.
<br /> </p>
<p>
Dumps must be stored in the local file system in XML format and may be compressed in gz or bz2. Dumps must be stored in the local file system in XML format and may be compressed in gz or bz2.
<br /> </p>
<div class="input-group"> <div class="form-group">
<span style="display: inline-block"> <div class="col-sm-3 col-md-2 col-lg-2">
<input name="file" style="" type="file" value="" size="75" /></span> <label for="file" class="control-label" >Dump file path</label>
<div class="btn-group"> </div>
<input name="submit" class="btn btn-primary" type="submit" value="Import MediaWiki Dump" /> <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"/>
</div> </div>
</div> </div>
<input name="submit" class="btn btn-primary" type="submit" value="Import MediaWiki Dump" />
</fieldset> </fieldset>
</form> </form>
<p> <p>

Loading…
Cancel
Save