From 8d7287b7c87f8a9528c8d45d019b7ae7241672a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandre=20Delano=C3=AB?= <devel+git@delanoe.org> Date: Sun, 19 Jan 2020 21:27:19 +0100 Subject: [PATCH] [FIX] upload file urlEncoded right url (without query params). --- .../Components/Forest/Tree/Node/Action/Upload.purs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Gargantext/Components/Forest/Tree/Node/Action/Upload.purs b/src/Gargantext/Components/Forest/Tree/Node/Action/Upload.purs index c0fe070c..aa03f37c 100644 --- a/src/Gargantext/Components/Forest/Tree/Node/Action/Upload.purs +++ b/src/Gargantext/Components/Forest/Tree/Node/Action/Upload.purs @@ -173,8 +173,9 @@ uploadFile session id fileType (UploadFileContents fileContents) = --postMultipartFormData session p fileContents where q = FileUploadQuery { fileType: fileType } - p = NodeAPI Corpus (Just id) $ "add/file/async/nobody" <> Q.print (toQuery q) + --p = NodeAPI Corpus (Just id) $ "add/file/async/nobody" <> Q.print (toQuery q) + p = NodeAPI Corpus (Just id) $ "add/form/async/nobody" -- <> Q.print (toQuery q) bodyParams = [ - Tuple "data" (Just fileContents) - , Tuple "filetype" (Just $ show fileType) + Tuple "_wf_data" (Just fileContents) + , Tuple "_wf_filetype" (Just $ show fileType) ] -- 2.21.0