box / box/box-ui-elements

When uploading multiple files and one fails, ContentExplorer does not call upload listener

Open
#3,374 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
551
Forks
351
Avg merge
5d 9h
Merged PRs (30d)
31

Description

**_If you are a Box employee, you do not need to create an issue to open a pull request_**

Please fill out the following template so we can reproduce and fix your issue as quickly as possible!

**Note:** if your issue includes a potential security vulnerability, please do not file it here. Instead, email the issue to security@box.com for support.

**Note:** if your issue involves previewing files, please report the issue [here](https://github.com/box/box-content-preview/issues/new/choose).

**Environment:**

- Elements version:
-https://cdn01.boxcdn.net/platform/elements/13.0.0/en-US/explorer.css

**Desktop (please complete the following information):**

- OS: [e.g. Windows 10]
Windows 10
- Browser [e.g. chrome, safari]
Chrome
- Version [e.g. 22]
Version 114.0.5735.199 (Official Build) (64-bit)

**Steps to reproduce the problem:**
Uploaded multiple files and when one fails, ContentExplorer's upload listener is not called at all.
It should call for files that were successfully uploaded.
Also, when user clicks on Cancel button, it seems the upload listener is not called even though some files were successfully uploaded.

**What is the expected behavior? (Screenshots can be helpful here)**
ContentExplorer's upload listener should be called for every file successfully uploaded to box

**What went wrong? (Screenshots, console logs, or HAR files can be helpful here)**
Uploaded multiple files and when one fails, ContentExplorer's upload listener is not called at all.

**Link to application or sample code:**
contentExplorer.addListener('upload', function (arrFiles) {

//Post Meta Data
for (var i in arrFiles) {

//Post Meta Data to Service
var metaData = {
DocType: getDocType(),
FileName: arrFiles[i].name,
FileId: arrFiles[i].id,
InstitutionNumber: getInstitutionNumber(),
FundNumber: getFundNumber(),
FundId: getFundId(),
AssociatedId: getDocAssociatedData(),
FolderId: getFolderId(),
DeliverableKey: getDeliverableKey()
};

addMetaData(metaData);
//incrementDocumentCount(metaData);
}

**If relevant, link to file (or attach file here)**

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Additional context**
Add any other context about the problem here.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.