Rework userfile yet again
I'm settling on the idea that strings should never be returned from the userfile system. Instead, indicate which collection you want and pass objects across.
This commit is contained in:
parent
c2d84b8734
commit
fdd783c19c
10 changed files with 198 additions and 160 deletions
|
|
@ -62,7 +62,7 @@ func postPoolUpload(w http.ResponseWriter, r *http.Request, u *models.User) {
|
|||
respondError(w, "Failed to parse form", err, http.StatusBadRequest)
|
||||
return
|
||||
}
|
||||
uploads, err := userfile.SaveFileUpload(r, "csvfile", "pool", "csv")
|
||||
uploads, err := userfile.SaveFileUpload(r, "csvfile", userfile.CollectionCSV)
|
||||
if err != nil {
|
||||
respondError(w, "Failed to extract image uploads", err, http.StatusInternalServerError)
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue