This commit is contained in:
Lizandro Guarnizo
2026-06-03 22:39:58 -05:00
parent 35a384eeba
commit ff72bd0269
2 changed files with 51 additions and 7 deletions
+4 -1
View File
@@ -15,6 +15,9 @@ import (
// helper: obtiene el provider OSS por ID o el activo por defecto
func getOSSProvider(c *fiber.Ctx) (services.OSSProvider, error) {
idStr := c.Query("oss_api_id", "")
if idStr == "" {
idStr = c.FormValue("oss_api_id", "")
}
if idStr != "" {
id, err := strconv.ParseUint(idStr, 10, 32)
if err == nil && id > 0 {
@@ -224,7 +227,7 @@ func OssBrowserSignedURL(c *fiber.Ctx) error {
}
// OssBrowserDelete elimina un objeto del bucket activo.
// Body JSON: { "key": "ruta/al/archivo.jpg" }
// Body JSON: { "key": "ruta/al/archivo.jpg", "oss_api_id": 1 }
func OssBrowserDelete(c *fiber.Ctx) error {
type Req struct {
Key string `json:"key"`