From 773c42e4f28a2e2ab3764a28ccb08db2d4e1af00 Mon Sep 17 00:00:00 2001 From: Matthew Penner Date: Mon, 24 Aug 2020 11:26:05 -0600 Subject: [PATCH] Fix #2253 --- public/assets/svgs/file_upload.svg | 1 - .../components/server/files/FileManagerBreadcrumbs.tsx | 2 +- resources/scripts/components/server/files/UploadButton.tsx | 4 +++- 3 files changed, 4 insertions(+), 3 deletions(-) delete mode 100644 public/assets/svgs/file_upload.svg diff --git a/public/assets/svgs/file_upload.svg b/public/assets/svgs/file_upload.svg deleted file mode 100644 index f11a922ff..000000000 --- a/public/assets/svgs/file_upload.svg +++ /dev/null @@ -1 +0,0 @@ -going up \ No newline at end of file diff --git a/resources/scripts/components/server/files/FileManagerBreadcrumbs.tsx b/resources/scripts/components/server/files/FileManagerBreadcrumbs.tsx index 5ec1efa8a..1cdcb05a4 100644 --- a/resources/scripts/components/server/files/FileManagerBreadcrumbs.tsx +++ b/resources/scripts/components/server/files/FileManagerBreadcrumbs.tsx @@ -45,7 +45,7 @@ export default ({ withinFileEditor, isNewFile }: Props) => { return (
- {(files && files.length && !params?.action) && + {(files && files.length > 0 && !params?.action) && { const [ loading, setLoading ] = useState(false); const { mutate } = useFileManagerSwr(); const { clearFlashes, clearAndAddHttpError } = useFlash(); + const directory = ServerContext.useStoreState(state => state.files.directory); useEventListener('dragenter', e => { e.stopPropagation(); @@ -60,7 +62,7 @@ export default () => { setLoading(true); clearFlashes('files'); getFileUploadUrl(uuid) - .then(url => axios.post(url, form, { + .then(url => axios.post(`${url}&directory=${directory}`, form, { headers: { 'Content-Type': 'multipart/form-data', },