diff --git a/packages/editor/src/components/inputs/FileBrowserInput.tsx b/packages/editor/src/components/inputs/FileBrowserInput.tsx index f57ae6fb6b..e26f20a4e1 100644 --- a/packages/editor/src/components/inputs/FileBrowserInput.tsx +++ b/packages/editor/src/components/inputs/FileBrowserInput.tsx @@ -89,13 +89,7 @@ export function FileBrowserInput({ async drop(item: any, monitor) { const isDropType = acceptDropItems.find((element) => element === item.type) if (isDropType) { - // Below url fix is applied when item is folder - let url = item.url - if (!url.endsWith(item.fullName)) { - url += item.fullName - } - - onRelease?.(url) + onRelease?.(item.url) } else { // https://github.com/react-dnd/react-dnd/issues/1345#issuecomment-538728576 const dndItem: any = monitor.getItem() diff --git a/packages/ui/src/components/editor/input/FileBrowser/index.tsx b/packages/ui/src/components/editor/input/FileBrowser/index.tsx index 67e9db394b..4935de536b 100644 --- a/packages/ui/src/components/editor/input/FileBrowser/index.tsx +++ b/packages/ui/src/components/editor/input/FileBrowser/index.tsx @@ -82,13 +82,7 @@ export function FileBrowserInput({ async drop(item: any, monitor) { const isDropType = acceptDropItems.find((element) => element === item.type) if (isDropType) { - // Below url fix is applied when item is folder - let url = item.url - if (!url.endsWith(item.fullName)) { - url += item.fullName - } - - onRelease?.(url) + onRelease?.(item.url) } else { // https://github.com/react-dnd/react-dnd/issues/1345#issuecomment-538728576 const dndItem: any = monitor.getItem()