Handle new format ID strings
This commit is contained in:
parent
48c40c87bc
commit
5dab0e50aa
3
main.go
3
main.go
@ -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"))
|
f, err := os.Create(path.Join(dir, idStr+".json"))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user