5 <meta charset=
"UTF-8" />
6 <title>QBT_TR(Upload local torrent)QBT_TR[CONTEXT=HttpServer]
</title>
7 <link rel=
"stylesheet" href=
"css/style.css?v=${CACHEID}" type=
"text/css" />
8 <link rel=
"stylesheet" href=
"css/Window.css?v=${CACHEID}" type=
"text/css" />
9 <script src=
"scripts/lib/MooTools-Core-1.6.0-compat-compressed.js"></script>
10 <script src=
"scripts/download.js?v=${CACHEID}"></script>
14 <iframe id=
"upload_frame" name=
"upload_frame" class=
"invisible" title=
"" src=
"about:blank"></iframe>
15 <form action=
"api/v2/torrents/add" enctype=
"multipart/form-data" method=
"post" id=
"uploadForm" style=
"text-align: center;" target=
"upload_frame" autocorrect=
"off" autocapitalize=
"none">
16 <div style=
"margin-top: 25px; display: inline-block; border: 1px solid lightgrey; border-radius: 4px;">
17 <input type=
"file" id=
"fileselect" accept=
".torrent, application/x-bittorrent" name=
"fileselect[]" multiple
/>
19 <fieldset class=
"settings" style=
"border: 0; text-align: left; margin-top: 12px;">
20 <table style=
"margin: auto;">
23 <label for=
"autoTMM">QBT_TR(Torrent Management Mode:)QBT_TR[CONTEXT=AddNewTorrentDialog]
</label>
26 <select id=
"autoTMM" name=
"autoTMM" onchange=
"qBittorrent.Download.changeTMM(this)">
27 <option selected
value=
"false">QBT_TR(Manual)QBT_TR[CONTEXT=AddNewTorrentDialog]
</option>
28 <option value=
"true">QBT_TR(Automatic)QBT_TR[CONTEXT=AddNewTorrentDialog]
</option>
34 <label for=
"savepath">QBT_TR(Save files to location:)QBT_TR[CONTEXT=HttpServer]
</label>
37 <input type=
"text" id=
"savepath" name=
"savepath" style=
"width: 16em;" />
42 <label for=
"rename">QBT_TR(Rename torrent)QBT_TR[CONTEXT=HttpServer]
</label>
45 <input type=
"text" id=
"rename" name=
"rename" style=
"width: 16em;" />
50 <label for=
"category">QBT_TR(Category:)QBT_TR[CONTEXT=AddNewTorrentDialog]
</label>
53 <div class=
"select-watched-folder-editable">
54 <select id=
"categorySelect" onchange=
"qBittorrent.Download.changeCategorySelect(this)">
55 <option selected
value=
"\other"></option>
57 <input name=
"category" type=
"text" />
63 <label for=
"startTorrent">QBT_TR(Start torrent)QBT_TR[CONTEXT=AddNewTorrentDialog]
</label>
66 <input type=
"hidden" id=
"startTorrentHidden" name=
"paused" />
67 <input type=
"checkbox" id=
"startTorrent" />
72 <label for=
"addToTopOfQueue">QBT_TR(Add to top of queue)QBT_TR[CONTEXT=AddNewTorrentDialog]
</label>
75 <input type=
"checkbox" id=
"addToTopOfQueue" name=
"addToTopOfQueue" value=
"true" />
80 <label for=
"stopCondition">QBT_TR(Stop condition:)QBT_TR[CONTEXT=AddNewTorrentDialog]
</label>
83 <select id=
"stopCondition" name=
"stopCondition">
84 <option selected
value=
"None">QBT_TR(None)QBT_TR[CONTEXT=AddNewTorrentDialog]
</option>
85 <option value=
"MetadataReceived">QBT_TR(Metadata received)QBT_TR[CONTEXT=AddNewTorrentDialog]
</option>
86 <option value=
"FilesChecked">QBT_TR(Files checked)QBT_TR[CONTEXT=AddNewTorrentDialog]
</option>
92 <label for=
"skip_checking">QBT_TR(Skip hash check)QBT_TR[CONTEXT=AddNewTorrentDialog]
</label>
95 <input type=
"checkbox" id=
"skip_checking" name=
"skip_checking" value=
"true" />
100 <label for=
"contentLayout">QBT_TR(Content layout:)QBT_TR[CONTEXT=AddNewTorrentDialog]
</label>
103 <select id=
"contentLayout" name=
"contentLayout">
104 <option selected
value=
"Original">QBT_TR(Original)QBT_TR[CONTEXT=AddNewTorrentDialog]
</option>
105 <option value=
"Subfolder">QBT_TR(Create subfolder)QBT_TR[CONTEXT=AddNewTorrentDialog]
</option>
106 <option value=
"NoSubfolder">QBT_TR(Don't create subfolder)QBT_TR[CONTEXT=AddNewTorrentDialog]
</option>
112 <label for=
"sequentialDownload">QBT_TR(Download in sequential order)QBT_TR[CONTEXT=TransferListWidget]
</label>
115 <input type=
"checkbox" id=
"sequentialDownload" name=
"sequentialDownload" value=
"true" />
120 <label for=
"firstLastPiecePrio">QBT_TR(Download first and last pieces first)QBT_TR[CONTEXT=TransferListWidget]
</label>
123 <input type=
"checkbox" id=
"firstLastPiecePrio" name=
"firstLastPiecePrio" value=
"true" />
128 <label for=
"dlLimitText">QBT_TR(Limit download rate)QBT_TR[CONTEXT=HttpServer]
</label>
131 <input type=
"hidden" id=
"dlLimitHidden" name=
"dlLimit" />
132 <input type=
"text" id=
"dlLimitText" style=
"width: 16em;" placeholder=
"KiB/s" />
137 <label for=
"upLimitText">QBT_TR(Limit upload rate)QBT_TR[CONTEXT=HttpServer]
</label>
140 <input type=
"hidden" id=
"upLimitHidden" name=
"upLimit" />
141 <input type=
"text" id=
"upLimitText" style=
"width: 16em;" placeholder=
"KiB/s" />
145 <div id=
"submitbutton" style=
"margin-top: 30px; text-align: center;">
146 <button type=
"submit" style=
"font-size: 1em;">QBT_TR(Upload Torrents)QBT_TR[CONTEXT=HttpServer]
</button>
153 let submitted
= false;
155 $('uploadForm').addEventListener("submit", function() {
156 $('startTorrentHidden').value
= $('startTorrent').checked
? 'false' : 'true';
158 $('dlLimitHidden').value
= $('dlLimitText').value
.toInt() * 1024;
159 $('upLimitHidden').value
= $('upLimitText').value
.toInt() * 1024;
161 $('upload_spinner').style
.display
= "block";
165 $('upload_frame').addEventListener("load", function() {
167 window
.parent
.closeWindows();
170 if ((Browser
.platform
=== 'ios') || ((Browser
.platform
=== 'mac') && (navigator
.maxTouchPoints
> 1))) {
171 $('fileselect').accept
= ".torrent";
174 <div id=
"upload_spinner" class=
"mochaSpinner"></div>