solidarity-transport-2 #2

Merged
adelcasse merged 69 commits from solidarity-transport-2 into main 2026-01-05 16:52:36 +00:00
Showing only changes of commit 7184f4735c - Show all commits

View File

@@ -240,13 +240,8 @@ func (h *ApplicationHandler) AgendaDisplayEvent(w http.ResponseWriter, r *http.R
}
}
documents:= []filestorage.FileInfo{}
files := h.filestorage.List(filestorage.PREFIX_AGENDA + "/" + eventid)
for _, f := range files {
if strings.HasPrefix(f.Key, eventid) {
documents = append(documents, f)
}
}
documents := h.filestorage.List(filestorage.PREFIX_AGENDA + "/" + eventid)
events_file_types := h.config.GetStringSlice("modules.agenda.documents_types")
file_types_map := h.config.GetStringMapString("storage.files.file_types")
@@ -727,17 +722,11 @@ func (h *ApplicationHandler) EventDocuments(w http.ResponseWriter, r *http.Reque
fmt.Println("metadata", metadata)
fmt.Println(filestorage.PREFIX_AGENDA)
// if err := h.filestorage.Put(file, filestorage.PREFIX_AGENDA, fmt.Sprintf("%s/%s_%s", eventID, fileid, header.Filename), header.Size, metadata); err != nil {
// fmt.Println(err)
// w.WriteHeader(http.StatusInternalServerError)
// return
// }
// if err := h.filestorage.Put(file, filestorage.PREFIX_BENEFICIARIES, fmt.Sprintf("%s/%s_%s", eventID, fileid, header.Filename), header.Size, metadata); err != nil {
// fmt.Println(err)
// w.WriteHeader(http.StatusInternalServerError)
// return
// }
if err := h.filestorage.Put(file, filestorage.PREFIX_AGENDA, fmt.Sprintf("%s/%s_%s", eventID, fileid, header.Filename), header.Size, metadata); err != nil {
fmt.Println(err)
w.WriteHeader(http.StatusInternalServerError)
return
}
http.Redirect(w, r, fmt.Sprintf("/app/agenda/%s", eventID), http.StatusFound)