The error occurs when using download_archive_url & create_zip method.
Could you please help me with the below issue?
- The error occurs when using download_archive_url if setting an expiration time.
I am using the .NET SDK and set 'ExpiresAt' by UNIX time (integer)
{
"error": {
"message": "Invalid Signature 15e2c990924754a0652dbbf840cff7f120d5c49d. String to sign - 'expires_at=1.596698E 09&mode=download&public_ids=Test_202008060715506036_image.zip,Test_202008060715506036_video.zip×tamp=1596698196'."
}
} - I used the 'FullyQualifiedPublicIds' method like the below page. But the error occurs when the creation zip file if using multiple formats.
https://support.cloudinary.com/hc/en-us/community/posts/360007582099-Download-different-resource-types-in-one-zip-file
-
I confirmed it.
Thank you for your support.
1 -
Hi,
It seems the "expires_at" time was passed like this: "expires_at=1.596698E+09". Since this is a long integer number it was probably converted before upload. Please make sure to pass a valid Unix time and let us know if it solves your issue.
Thanks,
Michal
0 -
Hi,
I have known that the cause of the download_url error is caused by the value of expires_at.
But, I can't control the value of expires_at.
I share my source..NET ------------------------------------------------------------------------------------------------------
var createArchiveParams = new ArchiveParams();createArchiveParams.ResourceType("raw");
createArchiveParams.PublicIds(createArchivePublicIds);
createArchiveParams.ExpiresAt(1596772599);string downloadArchiveUrl = cloudinary.DownloadArchiveUrl(createArchiveParams);
---------------------------------------------------------------------------------------------------------------Thanks,
0 -
Hi,
The `expires_at` parameter you pass is indeed converted to an exponential number.
For example, `1596916800` will be converted to `1.596917E+09` and this converted number is used to generate the signature.This conversion shouldn't happen so I will escalate this issue to our team and will let you know when it is fixed.
Best,
Loic0 -
Thank you for your support.
0 -
any good news for this problem yet?
0 -
I found this code in your github repository.
AddParam function is defined to cast the value to float type at second parameter even though ArchiveParams pass the value as int.
can you fix it soon?
[CloudinaryDotNet.Actions.ArchiveParams.cs]
if (m_expiresAt > 0 && m_mode == ArchiveCallMode.Download)
{
AddIntParam(dict, "expires_at", m_expiresAt);
}
[CloudinaryDotNet.Actions.BaseParams.cs]
protected static void AddParam(SortedDictionary<string, object> dict, string key, float value)
{
dict.Add(key, value.ToString(CultureInfo.InvariantCulture));
}
0 -
Hi,
A fix was merged to master a few hours ago -
https://github.com/cloudinary/CloudinaryDotNet/pull/240Would you mind testing that and let us know if it works for you now?
0 -
I confirmed the expires_at method after updating v.1.12.0
When is the package updated on NuGet?
Thank you for your support.
0 -
Hi,
The package was updated on NuGet two days ago:
https://www.nuget.org/packages/CloudinaryDotNet/1.12.0
Try updating and let us know if it works?0
Post is closed for comments.
Comments
10 comments