Elfinder: [ISSUE] When maxTargets = 1. Elfinder can't call loadThumbnails if images are more than one.

Created on 19 Sep 2018  路  3Comments  路  Source: Studio-42/elFinder

Reproduce step.

  1. Set option maxTargets be 1.
  2. Upload multiple images by drag and drop.
  3. Image uploaded success but problem is incoming. (LOL)

After that ELFinder try to refresh UI and call loadThumbnails
https://github.com/Studio-42/elFinder/blob/632bc974529fc820b54fd4805f58651443c3a46f/js/ui/cwd.js#L1254

then request will call
https://github.com/Studio-42/elFinder/blob/632bc974529fc820b54fd4805f58651443c3a46f/js/ui/cwd.js#L1285-L1288

but it will stop because these lines.
https://github.com/Studio-42/elFinder/blob/632bc974529fc820b54fd4805f58651443c3a46f/js/elFinder.js#L2272-L2275

after that UI have problems.

  • Can't show thumbnail.
  • Can't delete file or directory.
  • Can't create new directory.
client bug

All 3 comments

Right now I make stupid patch for use right now by add cmd != "tmb" inside if like this.

if (cmd != "tmb" && self.maxTargets && data.targets && data.targets.length > self.maxTargets) {
    syncOnFail = false;
    return dfrd.reject(['errMaxTargets', self.maxTargets]);
}

I don't think this is good solution so I create this issue.

@ethaizone On the handling of maxTargets option some problems on the client side were found and I fixed it. Thanks! 馃憤

@ethaizone On the handling of maxTargets option some problems on the client side were found and I fixed it. Thanks! 馃憤

Good to hear. Thx. :)

Was this page helpful?
0 / 5 - 0 ratings