Skip to content

Uploading several files to a file drop link without Tus sends later files to wrong URLs #3759

Closed

Description

@AlexAndBear

Initial Checklist

  • I understand this is a bug report and questions should be posted in the Community Discussions
  • I searched issues and couldn’t find anything (or linked relevant results below)

Bug Description

Uploading several files to a file drop link without Tus sends later files to wrong URLs. Cause: packages/web-app-files/src/HandleUpload.ts:134-142 reassigns the shared endpoint variable inside the loop: endpoint = urlJoin(endpoint, encodeURIComponent(file.name)).

Reproduction Steps

  1. Open a public file drop link on an instance without Tus uploads (XHR upload).
  2. Drop two or more files at once.

Expected Outcome

Each file is uploaded to <endpoint>/<its name>.

Actual Outcome

Each later file's endpoint has the earlier file names appended, so they end up at wrong paths or fail (found in the review of #3693, from the code).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions