ensure filestore's directory exists

This commit is contained in:
Acconut 2015-02-01 15:44:48 +01:00
parent 711809e564
commit d1db159552
1 changed files with 5 additions and 0 deletions

View File

@ -4,10 +4,15 @@ import (
"github.com/tus/tusd"
"github.com/tus/tusd/filestore"
"net/http"
"os"
)
func main() {
if err := os.MkdirAll("./data/", os.FileMode(0666)); err != nil {
panic(err)
}
store := filestore.FileStore{
Path: "./data/",
}