Fix avatar upload path by adding a leading dot to the avatars directory
This commit is contained in:
@@ -4038,7 +4038,7 @@ func uploadUserAvatarHandler(w http.ResponseWriter, r *http.Request, db *databas
|
||||
|
||||
// Upload to Nextcloud
|
||||
client := storage.NewWebDAVClient(cfg)
|
||||
avatarPath := fmt.Sprintf("avatars/%s", filename)
|
||||
avatarPath := fmt.Sprintf(".avatars/%s", filename)
|
||||
err = client.Upload(r.Context(), avatarPath, bytes.NewReader(fileBytes), header.Size)
|
||||
if err != nil {
|
||||
errors.LogError(r, err, "Failed to upload avatar")
|
||||
|
||||
Reference in New Issue
Block a user