Handle new format ID strings

This commit is contained in:
Jakob Borg 2014-12-02 14:26:32 +01:00
parent 48c40c87bc
commit 5dab0e50aa
1 changed files with 3 additions and 0 deletions

View File

@ -126,6 +126,9 @@ func newDataHandler(w http.ResponseWriter, r *http.Request) {
}
}
// The ID is base64 encoded, so can contain slashes. Replace those with dots instead.
idStr = strings.Replace(idStr, "/", ".", -1)
f, err := os.Create(path.Join(dir, idStr+".json"))
if err != nil {
log.Println(err)