Unexpected behavior: vault + autoStart==false + fileLimit==1

I have a minor issue using DHTMLX Vault 2.5.

Configuration:
autoStart: false,
autoRemove: false,
buttonUpload: true,
buttonClear: true,
filesLimit: 1,
uploadUrl: ‘consumerUrl’

Use case:

  • add file to vault
  • remove file (clear button) without uploading it to a backend
  • try to add different file

Expected result:
second file added to the vault

Actual result:
second file is not added at all due to default onBeforeFileAdd handler. I would expect that in case of autoStart == false files_added counter would be decremented by a number of files which were not uploaded yet. In other words that only uploaded files would count to the limit.

Is the setFilesLimit only workaround for this? Or maybe I just did not get developers intention right in the first place and it works as expected. Either way I wanted to post this in case anyone else had similar scenario to implement.

Hello.
Thanks, we can confirm the bug.
Fix will be included in the next build.

Good to hear that!
Thanks Nikolay