Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- Margins for scrollbar on `file-browser`
- Clickability on dropzone widget
- Handle Dropzone enable/disable properly
- Prevent users from selecting multiple files by clicking 'Upload' button in Quickfiles

## [0.12.4] - 2017-12-04
### Added
Expand Down
7 changes: 7 additions & 0 deletions addon/components/dropzone-widget/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ export default Ember.Component.extend({
}
});

// Dropzone.js does not have an option for disabling selecting multiple files when clicking the "upload" button.
// Therefore, we remove the "multiple" attribute for the hidden file input element, so that users cannot select
// multiple files for upload in the first place.
if (this.get('options.preventMultipleFiles') && this.get('clickable')){
Ember.$('.dz-hidden-input').removeAttr('multiple');
}

this.set('dropzoneElement', drop);

// Set osf session header
Expand Down