Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

239
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!