up
This commit is contained in:
@@ -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"`
|
||||
|
||||
Reference in New Issue
Block a user