box / box/box-ui-elements

"beforeupload" event does not work in Content Explorer

Open
#2,703 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
551
Forks
351
Avg merge
5d 9h
Merged PRs (30d)
31

Description

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:
13.0.0, 11.0.2

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

- OS: [Windows 10, Max OS 11]
- Browser [Chrome, IE11]
- Version [93.0.4577.82]

**Steps to reproduce the problem:**

When users tried to retrieve "beforeupload" events in Content Explorer,
it does not work. For example, an user attach the files in the Content Explorer, nothing happens.
On the other hand, Content Uploader is able to listen the event. Is it possible to detect "beforeupload" events in Content Exproler?

sample code:

```
contentExplorer.addListener('beforeupload', function(file) {
console.log(`I am about to upload`);
});
```
**What is the expected behavior? (Screenshots can be helpful here)**

**What went wrong? (Screenshots, console logs, or HAR files can be helpful here)**

**Link to application or sample code:**

**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.
https://cloud.box.com/s/js2eqvo8jmj3rhupi90jzjsh29bjpu6t
**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.