Skip to content

Commit

Permalink
fix(file-item): skip isImage check for the external files before up…
Browse files Browse the repository at this point in the history
…load
  • Loading branch information
nd0ut committed Sep 27, 2022
1 parent 0b752eb commit 7f19457
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion blocks/FileItem/FileItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,10 @@ export class FileItem extends UploaderBlock {

this._subEntry('isImage', (isImage) => {
let imagesOnly = this.getCssData('--cfg-img-only');

if (entry.getValue('externalUrl') && !entry.getValue('uuid') && imagesOnly && !isImage) {
// don't validate not uploaded files with external url, cause we don't know if they're images or not
return;
}
if (imagesOnly && !isImage) {
entry.setValue('validationErrorMsg', this.l10n('images-only-accepted'));
}
Expand Down

0 comments on commit 7f19457

Please sign in to comment.