Skip to content

TagSpaces is an offline, open source, document manager with tagging support

fix: uploading file to s3 from windows

Ilian Sapundshievc8102f8e5983
diff --git a/app/components/dialogs/CreateDialog.tsx b/app/components/dialogs/CreateDialog.tsx
index 76fa63340..5c7a487d4 100644
--- a/app/components/dialogs/CreateDialog.tsx
+++ b/app/components/dialogs/CreateDialog.tsx
@@ -173,7 +173,7 @@ const CreateDialog = (props: Props) => {
const file = selection.currentTarget.files[0];
const filePath =
normalizePath(selectedDirectoryPath) +
- AppConfig.dirSeparator +
+ PlatformIO.getDirSeparator() +
decodeURIComponent(file.name);
const reader = new FileReader();
diff --git a/app/components/menus/DirectoryMenu.tsx b/app/components/menus/DirectoryMenu.tsx
index 66b8d9ed2..645efa780 100644
--- a/app/components/menus/DirectoryMenu.tsx
+++ b/app/components/menus/DirectoryMenu.tsx
@@ -230,7 +230,7 @@ const DirectoryMenu = (props: Props) => {
const file = selection.currentTarget.files[0];
const filePath =
normalizePath(props.directoryPath) +
- AppConfig.dirSeparator +
+ PlatformIO.getDirSeparator() +
decodeURIComponent(file.name);
const reader = new FileReader();
diff --git a/app/containers/MainPage.tsx b/app/containers/MainPage.tsx
index 51634c357..3d3a03bed 100644
--- a/app/containers/MainPage.tsx
+++ b/app/containers/MainPage.tsx
@@ -494,7 +494,7 @@ class MainPage extends Component<Props, State> {
fileName = decodeURIComponent(file.name);
filePath =
normalizePath(this.props.directoryPath) +
- AppConfig.dirSeparator +
+ PlatformIO.getDirSeparator() +
fileName;
} catch (err) {
console.warn(