Ajouter upload de documents par API #40

Merged
vlbeaudoin merged 6 commits from feature/v1-document-upload into main 2023-04-24 18:41:31 -04:00
Showing only changes of commit 2732d36066 - Show all commits

View file

@ -310,7 +310,6 @@ func handleV1DocumentCreate(c echo.Context) error {
documents_secret_access_key := viper.GetString("server.documents.secret_access_key") documents_secret_access_key := viper.GetString("server.documents.secret_access_key")
documents_use_ssl := viper.GetBool("server.documents.use_ssl") documents_use_ssl := viper.GetBool("server.documents.use_ssl")
//bucket := c.FormValue("bucket")
bucket := c.Param("bucket") bucket := c.Param("bucket")
form_file, err := c.FormFile("file") form_file, err := c.FormFile("file")
@ -343,9 +342,6 @@ func handleV1DocumentCreate(c echo.Context) error {
ContentType: form_file.Header.Get("Content-Type"), ContentType: form_file.Header.Get("Content-Type"),
}) })
if err != nil { if err != nil {
//TODO
log.Println(err)
return c.JSON(http.StatusInternalServerError, map[string]string{ return c.JSON(http.StatusInternalServerError, map[string]string{
"message": "Error during minio#PutObject", "message": "Error during minio#PutObject",
}) })