Skip to content

Commit

Permalink
Enabling multiple file upload option for local file browser. Closes #710
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsielicki committed Apr 10, 2017
1 parent bdc222e commit b3f155c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions web-server/js/slycat-local-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ define("slycat-local-browser", ["slycat-server-root", "slycat-web-client", "knoc
var component = this;
component.selection = params.selection;
component.disabled = params.disabled === undefined ? false : params.disabled;
component.multiple = params.multiple == true ? 'multiple' : null; // Set multiple parameter to true if you want multiple file selection enabled
component.selection_changed = function(model, event)
{
component.selection(event.target.files);
Expand Down
2 changes: 1 addition & 1 deletion web-server/templates/slycat-local-browser.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
File
</label>
<div class="col-sm-10">
<input type="file" class="" id="slycat-local-browser-file" placeholder="file" data-bind="event:{change: selection_changed}, attr: {'disabled' : disabled}">
<input type="file" class="" id="slycat-local-browser-file" placeholder="file" data-bind="event:{change: selection_changed}, attr: {'disabled' : disabled, 'multiple' : multiple}">
</div>
</div>

0 comments on commit b3f155c

Please sign in to comment.