postFileDeleteR :: FileId ->  Handler RepHtml
postFileDeleteR fid = do
  file :: File <- runDB $ get404 fid
  ((result,fwidget), enctype) <- runFormPost fileDeleteForm

  case result of
    FormSuccess _ -> do
        deleteFile (Entity fid file)
        defaultLayout [whamlet|
                       <p> <strong>File deleted.</strong> |]
    _ -> defaultLayout $ do
              setTitle "Deleting a file."
              $(widgetFile "file/delete")
postFileDeleteR :: FileId ->  Handler RepHtml
postFileDeleteR fid = do
  file :: File <- runDB $ get404 fid
  ((result,fwidget), enctype) <- runFormPost fileDeleteForm

  case result of
    FormSuccess _ -> do
        deleteFile (Entity fid file)
        defaultLayout [whamlet|
                       <p> <strong>File deleted.</strong> |]
    _ -> defaultLayout $ do
              setTitle "Deleting a file."
              $(widgetFile "file/delete")
postFileDeleteR fid = do
  file :: File <- runDB $ get404 fid
  ((result,fwidget), enctype) <- runFormPost fileDeleteForm

  case result of
    FormSuccess _ -> do
        deleteFile (Entity fid file)
        defaultLayout [whamlet|
                       <p> <strong>File deleted.</strong> |]
    _ -> defaultLayout $ do
              setTitle "Deleting a file."
              $(widgetFile "file/delete")