Skip to content

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

fix local upload to S3

sytolkf9b4f2a8fc85
diff --git a/src/renderer/components/TargetFileBox.tsx b/src/renderer/components/TargetFileBox.tsx
index 7b3a5f6b8..4df82b9de 100644
--- a/src/renderer/components/TargetFileBox.tsx
+++ b/src/renderer/components/TargetFileBox.tsx
@@ -125,6 +125,15 @@ function TargetFileBox(props: Props) {
if (files && files.length) {
const location = findLocation(locationId);
+ if (AppConfig.isElectron) {
+ files = files.map((file) => {
+ if (!file.path) {
+ file.path = window.electronIO.ipcRenderer.getPathForFile(file);
+ }
+ return file;
+ });
+ }
+
if (
AppConfig.isElectron &&
!location.haveObjectStoreSupport() &&
diff --git a/src/renderer/components/dialogs/hooks/MoveOrCopyFilesDialogContextProvider.tsx b/src/renderer/components/dialogs/hooks/MoveOrCopyFilesDialogContextProvider.tsx
index 34ff8515e..616fc4aad 100644
--- a/src/renderer/components/dialogs/hooks/MoveOrCopyFilesDialogContextProvider.tsx
+++ b/src/renderer/components/dialogs/hooks/MoveOrCopyFilesDialogContextProvider.tsx
@@ -67,12 +67,6 @@ export const MoveOrCopyFilesDialogContextProvider = ({
if (!selectedFiles || selectedFiles.length === 0) {
return;
}
- selectedFiles = selectedFiles.map((file) => {
- if (!file.path) {
- file.path = window.electronIO.ipcRenderer.getPathForFile(file);
- }
- return file;
- });
open.current = true;
targetDir.current = targetDirectory;
targetLocationId.current = targetLocationID;