tDownR :: Int -> Handler TypedContent
getDownR faid = do
  fa <- getById faid
  let mime = encodeUtf8 $ pack $ fileAssocMime fa
  let conts = toContent $ fileAssocContents fa
  addHeader "Content-Disposition" $ pack $
                  printf "attachment; filename=\"%s\"" $ fileAssocName fa
  sendResponse (mime, conts)

getDownR :: Int -> Handler TypedContent
getDownR faid = do
  fa <- getById faid
  let mime = encodeUtf8 $ pack $ fileAssocMime fa
  let conts = toContent $ fileAssocContents fa
  addHeader "Content-Disposition" $ pack $
                  printf "attachment; filename=\"%s\"" $ fileAssocName fa
  sendResponse (mime, conts)
getDownR faid = do
  fa <- getById faid
  let mime = encodeUtf8 $ pack $ fileAssocMime fa
  let conts = toContent $ fileAssocContents fa
  addHeader "Content-Disposition" $ pack $
                  printf "attachment; filename=\"%s\"" $ fileAssocName fa
  sendResponse (mime, conts)