error: {message : 'Stale request'
Hello, I've been trying to use cloudinary on a local node server; and the only response I'm getting is this::
{ error:
{ message: 'Stale request - reported time is 2017-03-22 08:15:33 +0000 which is more than 1 hour ago',
http_code: 400 } }
does anyone know how I can solve this problem. Any help is greatly appreciated
-
Hi Emmanuel,
Getting the "Stale request" error usually means that either your computer's clock is in the past or the timestamp was not calculated in GMT. See this post for more information.
Let me know if this helps.
Nitzan
-
Hi Emmanuel,
You don't need to change your computer's clock.
The Api calls to Cloudinary should have a timestamp parameter with the current unix time in gmt. The error you received means that the timestamp you set in your request was too old (or perhaps in a local time zone instead of gmt)
If you are sure the timestamp you sent is correct and you can't get it to work please submit a support request, I will go over you account logs and find where the problem is.
Regards,
Nitzan
-
Hi Nitzan,
How to specify a timestamp on request?
Here is the .net code:
var uploadResult = new ImageUploadResult();
if (file.Length >0){
using (var stream = file.OpenReadStream()){var uploadParam =newImageUploadParams(){File = new FileDescription(file.Name, stream),Transformation = new Transformation().Width(500).Height(500).Crop("fill").Gravity("face")};
uploadResult = _cloudinary.Upload(uploadParam);}}Thanks,Charlie -
Hi Charlie,
The timestamp should be calculated in GMT.
Can you please open a support ticket at support@cloudinary.com with your cloud name for further investigations.
Thanks,
Shirly
-
I had the same error and slept off trying to configure my docker-machine with several commands, in the morning ...
What worked for me was to go to the time setting of my MacBook air and set my time zone to Botswana and the first day of the week as Monday, Then checked to set time automatically.
Once I did that and tried to send a request to my local PHP backend, the upload was successful.
Post is closed for comments.
Comments
8 comments