diff --git a/packages/bruno-app/src/components/FilePickerEditor/index.js b/packages/bruno-app/src/components/FilePickerEditor/index.js index 90e4a79e3..a7b67264d 100644 --- a/packages/bruno-app/src/components/FilePickerEditor/index.js +++ b/packages/bruno-app/src/components/FilePickerEditor/index.js @@ -4,6 +4,7 @@ import { useDispatch } from 'react-redux'; import { browseFiles } from 'providers/ReduxStore/slices/collections/actions'; import { IconX } from '@tabler/icons'; import { isWindowsOS } from 'utils/common/platform'; +import slash from 'utils/common/slash'; const FilePickerEditor = ({ value, onChange, collection }) => { value = value || []; @@ -27,7 +28,7 @@ const FilePickerEditor = ({ value, onChange, collection }) => { const collectionDir = collection.pathname; if (filePath.startsWith(collectionDir)) { - return path.relative(collectionDir, filePath); + return path.relative(slash(collectionDir), slash(filePath)); } return filePath;