You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "aglinxinyuan (via GitHub)" <gi...@apache.org> on 2026/08/09 12:04:12 UTC
[I] Dropping a folder on the file uploader reports a file failure that did not happen [texera]
aglinxinyuan opened a new issue, #7457:
URL: https://github.com/apache/texera/issues/7457
### Describe the bug
Dropping a folder onto the dataset file uploader reports a file failure that did not happen.
In `files-uploader.component.ts`, a dropped entry that is not a file resolves to `null`:
```ts
} else {
resolve(null); // directory
}
```
Those nulls are then filtered out of `successfulUploads`, but the failure count is computed against the *unfiltered* results:
```ts
const failedCount = results.length - successfulUploads.length;
if (failedCount > 0) {
this.showFileUploadBanner("error", `${failedCount} file${failedCount > 1 ? "s" : ""} failed to be selected.`);
}
```
A directory therefore counts as a failed file, even though nothing failed and nothing was meant to be uploaded.
### To Reproduce
1. Open a dataset and drag a **folder** onto the file drop area (alone, or alongside a valid file).
2. A red banner appears: *"1 file failed to be selected."*
3. Any valid files dropped alongside it are still selected correctly — only the banner is wrong.
### Expected behavior
A dropped directory is not a failure. `failedCount` should count only entries that actually rejected, i.e. exclude the deliberate `resolve(null)` cases — for example by tracking rejections separately, or by counting `results.filter(r => r.status === "rejected").length` rather than deriving from the length difference.
### Additional context
Found while adding coverage for the drop path. The accompanying test asserts only that the directory is excluded from the selection and deliberately does **not** assert the banner, so the miscount is not cemented while it stands.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Dropping a folder on the file uploader reports a file failure that did not happen [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #7457:
URL: https://github.com/apache/texera/issues/7457#issuecomment-5231419996
<!-- texera:template-compliance -->
👋 Thanks for opening this issue, @aglinxinyuan!
It looks like the issue description doesn't quite follow our template yet:
- This issue doesn't appear to use one of our templates (Bug, Feature, or Task). Please open it using a template so the required details are captured.
Filling out the template helps reviewers understand and triage your contribution faster. Please edit the description to complete it. This message will disappear automatically once the template is followed.
You can find the template prompts by editing the description, or see [CONTRIBUTING.md](https://github.com/apache/texera/blob/main/CONTRIBUTING.md) for the full contribution flow.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] Dropping a folder on the file uploader reports a file failure that did not happen [texera]
Posted by "Raja-Hamid (via GitHub)" <gi...@apache.org>.
Raja-Hamid commented on issue #7457:
URL: https://github.com/apache/texera/issues/7457#issuecomment-5379604265
/take
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org