We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 05e6506 commit 6d20780Copy full SHA for 6d20780
web/src/pages/app/storages/mods/UploadButton/index.tsx
@@ -55,7 +55,9 @@ function UploadButton(props: { onUploadSuccess: Function; children: React.ReactE
55
setFileList(newFileList);
56
for (let i = 0; i < files.length; i++) {
57
const file = files[i];
58
- const fileName = file.webkitRelativePath ? file.webkitRelativePath : file.name;
+ const fileName = file.webkitRelativePath
59
+ ? file.webkitRelativePath.replace(/^[^/]*\//, "")
60
+ : file.name;
61
await uploadFile(currentStorage?.name!, prefix + fileName, file, {
62
contentType: file.type,
63
});
0 commit comments