getFileGetNameR :: FileId -> Text -> Handler ()
getFileGetNameR fid _name = do
  file <- runDB $ get404 fid
  setHeader "Content-Disposition" (Data.Text.concat ["attachment; filename=\"",(fileOriginalName file), "\";"])
  setHeader "X-Content-Type-Options" "nosniff"
  let encodeContentType ct = Data.Text.Encoding.encodeUtf8 ct
      fct = encodeContentType $ fileOriginalContentType file
  sendFile (fct) (filePath file)

-- batch download
getFileGetNameR :: FileId -> Text -> Handler ()
getFileGetNameR fid _name = do
  file <- runDB $ get404 fid
  setHeader "Content-Disposition" (Data.Text.concat ["attachment; filename=\"",(fileOriginalName file), "\";"])
  setHeader "X-Content-Type-Options" "nosniff"
  let encodeContentType ct = Data.Text.Encoding.encodeUtf8 ct
      fct = encodeContentType $ fileOriginalContentType file
  sendFile (fct) (filePath file)

-- batch download
getFileGetNameR fid _name = do
  file <- runDB $ get404 fid
  setHeader "Content-Disposition" (Data.Text.concat ["attachment; filename=\"",(fileOriginalName file), "\";"])
  setHeader "X-Content-Type-Options" "nosniff"
  let encodeContentType ct = Data.Text.Encoding.encodeUtf8 ct
      fct = encodeContentType $ fileOriginalContentType file
  sendFile (fct) (filePath file)

-- batch download