filepath.Join

This commit is contained in:
Chen-I Lim 2021-03-30 10:06:11 -07:00
parent 42fd52c13a
commit 8901bb964c

View file

@ -18,7 +18,7 @@ func (a *App) SaveFile(reader io.Reader, workspaceID, rootID, filename string) (
}
createdFilename := fmt.Sprintf(`%s%s`, utils.CreateGUID(), fileExtension)
filePath := fmt.Sprintf(`%s/%s/%s`, workspaceID, rootID, createdFilename)
filePath := filepath.Join(workspaceID, rootID, createdFilename)
_, appErr := a.filesBackend.WriteFile(reader, filePath)
if appErr != nil {