Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grégoire Locqueville
purescript-gargantext
Commits
6cfbebe7
Commit
6cfbebe7
authored
Aug 05, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[upload] v3 csv upload endpoint fix
parent
b2eab45c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
SearchBar.purs
.../Components/Forest/Tree/Node/Action/Search/SearchBar.purs
+0
-1
Upload.purs
...Gargantext/Components/Forest/Tree/Node/Action/Upload.purs
+7
-1
No files found.
src/Gargantext/Components/Forest/Tree/Node/Action/Search/SearchBar.purs
View file @
6cfbebe7
...
...
@@ -3,7 +3,6 @@ module Gargantext.Components.Forest.Tree.Node.Action.Search.SearchBar
, searchBar
) where
import Data.Tuple.Nested ((/\))
import Effect (Effect)
import Reactix as R
import Reactix.DOM.HTML as H
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Upload.purs
View file @
6cfbebe7
...
...
@@ -327,6 +327,13 @@ uploadFile session NodeList id JSON { mName, contents } = do
task <- post session url body
pure $ GT.AsyncTaskWithType { task, typ: GT.Form }
-}
uploadFile session NodeList id CSV { mName, contents } = do
let url = GR.NodeAPI NodeList (Just id) $ GT.asyncTaskTypePath GT.ListCSVUpload
let body = [ Tuple "_wtf_data" (Just contents)
, Tuple "_wtf_filetype" (Just $ show NodeList)
, Tuple "_wtf_name" mName ]
task <- postWwwUrlencoded session url body
pure $ GT.AsyncTaskWithType { task, typ: GT.Form }
uploadFile session nodeType id fileType { mName, contents } = do
-- contents <- readAsText blob
task <- postWwwUrlencoded session p bodyParams
...
...
@@ -338,7 +345,6 @@ uploadFile session nodeType id fileType { mName, contents } = do
Annuaire -> GR.NodeAPI nodeType (Just id) "annuaire"
NodeList -> case fileType of
JSON -> GR.NodeAPI nodeType (Just id) $ GT.asyncTaskTypePath GT.ListUpload
CSV -> GR.NodeAPI nodeType (Just id) $ GT.asyncTaskTypePath GT.ListCSVUpload
_ -> GR.NodeAPI nodeType (Just id) ""
_ -> GR.NodeAPI nodeType (Just id) ""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment