Skip to content

Commit

Permalink
FIX Upload files issue in AssetDropzone (#1368)
Browse files Browse the repository at this point in the history
  • Loading branch information
sabina-talipova authored Jun 19, 2023
1 parent 6b9315d commit 4be853d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/TinyMCE_sslink-file.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion client/dist/js/TinyMCE_ssmedia.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions client/dist/js/bundle.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions client/src/components/AssetDropzone/AssetDropzone.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class AssetDropzone extends Component {
this.dropzone.hiddenFileInput.classList.add(`dz-input-${name}`);
}
// add listeners when necessary
if (this.props.canUpload && prevProps.canUpload !== this.props.canUpload) {
if (this.props.canUpload && prevProps.options !== this.props.options) {
if (this.dropzone) {
this.dropzone.enable();

Expand Down Expand Up @@ -308,10 +308,10 @@ class AssetDropzone extends Component {
* @param {object} file - File interface. See https://developer.mozilla.org/en-US/docs/Web/API/File
*/
handleUploadComplete(file) {
if (typeof this.props.onUploadComplete === 'function') {
this.props.onUploadComplete(file.status);
}
if (typeof this.props.onUploadComplete === 'function') {
this.props.onUploadComplete(file.status);
}
}

/**
* Event handler triggered when the user drops a file on the dropzone.
Expand Down

0 comments on commit 4be853d

Please sign in to comment.