Skip to main content

The error occurs when using download_archive_url & create_zip method.

Comments

10 comments

  • Michal Kuperman

    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
  • MyeongJong Sim

    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
  • Loic Verger Del Bove

    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,
    Loic

    0
  • MyeongJong Sim

    Thank you for your support.

    0
  • MyeongJong Sim

    any good news for this problem yet?

    0
  • MyeongJong Sim

    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
  • Roee Ben Ari

    Hi,

    A fix was merged to master a few hours ago - 
    https://github.com/cloudinary/CloudinaryDotNet/pull/240

    Would you mind testing that and let us know if it works for you now? 

    0
  • MyeongJong Sim

    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
  • Roee Ben Ari

    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
  • MyeongJong Sim

    I confirmed it.

    Thank you for your support.

    1

Post is closed for comments.