Upload to Cloudinary with .Net SDK - Invalid Signature

Abierto
#385 5 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
30/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
csharp
Área
api, backend

Línea de trabajo

Comienza reproduciendo el ejemplo de C# proporcionado con Cloudinary.Upload, ImageUploadParams, AddCustomParam y SignatureAlgorithm.SHA256. Compara la firma generada y la cadena del servidor con los parámetros de carga documentados y, a continuación, comprueba cómo interpreta el SDK Metadata frente a los parámetros personalizados. Se considera terminado cuando la carga de metadatos documentada produce una firma válida y la solicitud tiene éxito.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Bug report for Cloudinary .NET SDK

Before proceeding, please update to latest version and test if the issue persists

Describe the bug in a sentence or two.

When using the .NET SDK, it appears to not generate any signature. Additionally, my Cloudinary team requires metadata and the only way I can fulfill that requirement is with "addcustomparam" function.

Issue Type (Can be multiple)

  • Build - Cannot install or import the SDK
  • Performance - Performance issues
  • [ X ] Behaviour - Functions are not working as expected (such as generate URL)
  • [ X ] Documentation - Inconsistency between the docs and behaviour
  • Other (Specify)

Steps to reproduce

Account account = new Account("","","");
Cloudinary cloudinary = new Cloudinary(account);
cloudinary.Api.SignatureAlgorithm = SignatureAlgorithm.SHA256;

var uploadParams = new ImageUploadParams()
{
File = new FileDescription("IMG_2019.jpeg",File.OpenRead(file)),
UploadPreset = "",
Folder = ""
};

uploadParams.AddCustomParam("category","artwork");

var uploadResult = cloudinary.Upload(uploadParams);
Console.WriteLine(uploadResult.JsonObj);

Error screenshots or Stack Trace (if applicable)

When attempting to upload the file, the response is always: ""message": "Invalid Signature 6832973aae19f7f322bb88d48c7b34731c390f04cb9fafd5353ea5e5178639ea. String to sign - 'folder=&timestamp=1768517629&upload_preset='.""

If I try to set the Metadata in the ImageUploadParams() as the documentation suggests, I get the error that you cannot convert a "X" to a bool. the key work Metadata does not hold the same meaning though the documentation indicates it does.

OS and Version

  • Linux
  • [ X ] Windows
  • [ X ] macOS
  • MultiPlatform

Versions and Libraries (fill in the version numbers)

  • Cloudinary .NET SDK version - 1.27.9
  • .NET Core - 9.0.304
  • .NET Framework - n/a

Repository

I'm not sure on the repository. I can confirm that the same configuration works if I use the cloudinary-cli option.

If possible, please provide a link to a reproducible repository that showcases the problem

Lenguaje dominante
C#
Estrellas
105
Forks
72
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de cloudinary/CloudinaryDotNet

Todos los issues de cloudinary/CloudinaryDotNet

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.