fix uploaded directory name

This commit is contained in:
Karol Wypchlo 2021-11-04 14:20:43 +01:00
parent 2988f9e9ab
commit 03c72653c5
No known key found for this signature in database
GPG Key ID: C92C016317A964D0
1 changed files with 1 additions and 1 deletions

View File

@ -85,7 +85,7 @@ export default function UploaderElement({ onUploadStateChange, upload }) {
if (upload.mode === "directory") { if (upload.mode === "directory") {
const files = upload.file.files; const files = upload.file.files;
const directory = files.reduce((acc, file) => ({ ...acc, [getRelativeFilePath(file)]: file }), {}); const directory = files.reduce((acc, file) => ({ ...acc, [getRelativeFilePath(file)]: file }), {});
const name = encodeURIComponent(upload.name); const name = encodeURIComponent(upload.file.name);
response = await client.uploadDirectory(directory, name, { onUploadProgress }); response = await client.uploadDirectory(directory, name, { onUploadProgress });
} else { } else {