Commit 26c00151 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] upload/download file : backend url path

parent 750a8661
...@@ -3,12 +3,12 @@ module Gargantext.Components.Nodes.File where ...@@ -3,12 +3,12 @@ module Gargantext.Components.Nodes.File where
import Data.Argonaut (class DecodeJson, decodeJson, (.:)) import Data.Argonaut (class DecodeJson, decodeJson, (.:))
import Data.Maybe (Maybe(..)) import Data.Maybe (Maybe(..))
import DOM.Simple.Console (log2) import DOM.Simple.Console (log2)
import Effect.Aff (Aff, launchAff_) import Effect.Aff (Aff)
import Reactix as R import Reactix as R
import Reactix.DOM.HTML as H import Reactix.DOM.HTML as H
import Gargantext.Prelude import Gargantext.Prelude
import Gargantext.Ends (toUrl)
import Gargantext.Hooks.Loader (useLoader) import Gargantext.Hooks.Loader (useLoader)
import Gargantext.Routes (SessionRoute(..)) import Gargantext.Routes (SessionRoute(..))
import Gargantext.Sessions (Session, get) import Gargantext.Sessions (Session, get)
...@@ -101,7 +101,8 @@ fileLayoutLoadedCpt = R.hooksComponent "G.C.N.F.fileLayoutLoaded" cpt ...@@ -101,7 +101,8 @@ fileLayoutLoadedCpt = R.hooksComponent "G.C.N.F.fileLayoutLoaded" cpt
] ]
, H.div { className: "row" } [ , H.div { className: "row" } [
H.div { className: "btn btn-default" } [ H.div { className: "btn btn-default" } [
H.a { href: "/api/v1.0/node/" <> show nodeId <> "/file/download" H.a { -- href: "/api/v1.0/node/" <> show nodeId <> "/file/download"
href: toUrl session ("node/" <> show nodeId <> "/file/download")
, target: "_blank" , target: "_blank"
} [ H.text "Download" ] } [ H.text "Download" ]
] ]
......
...@@ -126,7 +126,7 @@ instance optionalInstance :: Union r t s => Optional r s ...@@ -126,7 +126,7 @@ instance optionalInstance :: Union r t s => Optional r s
showTabType' :: TabType -> String showTabType' :: TabType -> String
showTabType' (TabCorpus t) = show t showTabType' (TabCorpus t) = show t
showTabType' (TabDocument t) = show t showTabType' (TabDocument t) = show t
showTabType' (TabPairing t) = show t showTabType' (TabPairing t) = show t
data TabPostQuery = TabPostQuery { data TabPostQuery = TabPostQuery {
offset :: Int offset :: Int
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment