media improvements #12

Merged
stephen merged 5 commits from media into master 2017-09-09 16:24:49 +00:00
Showing only changes of commit eb32775986 - Show all commits
+1 -7
View File
@@ -3,7 +3,6 @@ package caddyhugo
import (
"fmt"
"html/template"
"io/ioutil"
"os"
"path"
@@ -90,14 +89,9 @@ func (ch *CaddyHugo) Setup(dir string) error {
return fmt.Errorf("edit template invalid: %v", err)
}
thumbDir, err := ioutil.TempDir("", "thumbs")
if err != nil {
return fmt.Errorf("couldn't initialize media: %v", err)
}
ch.Media = &media.MediaSource{
StorageDir: path.Join(dir, "media"),
ThumbDir: thumbDir,
ThumbDir: path.Join(dir, "thumbs"),
}
err = os.MkdirAll(ch.Media.StorageDir, 0755)