1
0
mirror of https://github.com/pocketbase/pocketbase.git synced 2025-01-10 00:43:36 +02:00

added debug log for the invalid uploaded file(s)

This commit is contained in:
Gani Georgiev 2022-07-30 14:11:08 +03:00
parent d87a5e544c
commit 20fe3c8c91

View File

@ -4,6 +4,7 @@ import (
"encoding/json"
"errors"
"fmt"
"log"
"net/http"
"regexp"
"strconv"
@ -201,6 +202,10 @@ func (form *RecordUpsert) LoadData(r *http.Request) error {
// check if there are any new uploaded form files
files, err := rest.FindUploadedFiles(r, key)
if err != nil {
if form.app.IsDebug() {
log.Printf("%q uploaded file error: %v\n", key, err)
}
continue // skip invalid or missing file(s)
}