Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

247
Vistas
Can't upload image to Cloudinary using client side signature call - invalid signature

I can't seem to generate the correct signature to upload an image successfully.

Error message -

message:'Invalid Signature 953e29c9b5cac0f611e347d508aaff75f11f0547. String to sign - 'timestamp=1631318071'.'

Maybe someone can tell me what I'm going wrong? Maybe the order of something (according to the docs)?

FYI - I tried changing the order I pass in the parameters server side but it didn't seem to do much to successfully upload.

Here is how I generate the signature client side (C#) and pass data to the client (Angular)

DateTime foo = DateTime.Now;
long timeStamp = ((DateTimeOffset)foo).ToUnixTimeSeconds();
var p = new Dictionary<string, object>();
p.Add("api_key", _cloudinaryConfig.Value.ApiKey);
p.Add("api_secret", _cloudinaryConfig.Value.ApiSecret);
p.Add("cloud_name", _cloudinaryConfig.Value.CloudName);
p.Add("timestamp", timeStamp);
var signature = _cloudinary.Api.SignParameters(p);
return Ok(new {
   cloudUploadUrl = _cloudUploadUrl, 
   cloudName = _cloudinaryConfig.Value.CloudName, 
   cloudApiKey = _cloudinaryConfig.Value.ApiKey, 
   cloudSignature = signature,
   cloudTimeStamp = timeStamp
});

Here is the client trying to upload an image in Angular

const data = new FormData();
data.append('file', croppedImage.base64);
data.append("api_key", cloudinaryParams.cloudApiKey);
data.append("signature", cloudinaryParams.cloudSignature);
data.append("timestamp", cloudinaryParams.cloudTimeStamp);

const fileResult = await fetch(cloudinaryParams.cloudUploadUrl, {
  method: 'POST',
  body: data,
});

const fileData = await fileResult.json();

if (fileData.error) {
  // do something to handle the error!
}

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

The string in the error message shows the parameters that are being checked on the server side against the signature you provided on the upload API call.

Based on that error, the only parameter that should be used to create the signature for your example upload API call is "timestamp", and it needs to have a value of 1631318071 on both the API call and in the function that created the signature: https://cloudinary.com/documentation/signatures

If I understand your C# code correctly, you can most likely fix this by removing all the p.add() calls except the one with the timestamp parameter

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda