jgm / gitit

A wiki using HAppS, pandoc, and git
GNU General Public License v2.0
2.15k stars 225 forks source link

export to ODT fails ... #337

Open oz123 opened 11 years ago

oz123 commented 11 years ago
  Server error: /home/ozn/wikis/wikidata/static/Error_Building_The_Work_Space.jpg: openFile: does not exist (No such file or directory)

as a work around I copied "static" into wikidata, and put the images inside it.

$ ls wikidata/static/
css               Error_Building_The_Work_Space.jpg  screenshot.1.jpg    Target_Editing.jpg
Empty_Target.jpg  img                                Target_Content.jpg

The problem with this work around is that, new images are uploaded in wikidata and not to wikidata/static/.

I have no clue about Haskell. But, I think this is because in the file Handlers.hs the variable dropWhile is hard coded:

uploadFile :: Handler
     uploadFile = withData $ \(params :: Params) -> do
     let origPath = pFilename params
     let filePath = pFilePath params
     let wikiname = normalise
              $ dropWhile (=='/')

IMHO, it would make sense to make this a configurable option.

akerbos commented 11 years ago

Sounds related to #353 and #346.