Getting the MD5 of a transformed 'fetch' image.

Comments

4 comments

  • Avatar
    Daniel Mendoza

    Hi,

    I apologize for the delay.

    The etag is equivalent of the MD5 signature of the uploaded image.
    Unfortunately, this information isn't stored on our side and therefore is recalculated for every image on demand. That is also why it's not returned in any admin request.

    HEAD request will work for you best, especially as it will hardly consume bandwidth and will provide much faster results.

    0
    Comment actions Permalink
  • Avatar
    Don Birkenmeyer

    I am computing the MD5 of the image stream from the fetch URL and also getting the "etag" from the header variables of a HEAD call to the same URL.  These values are always different.

    Looking at your response above [The etag is equivalent of the MD5 signature of the uploaded image.] Do you mean to say that the ETAG is NOT the MD5 of the image I am receiving (that is transformed) but is instead the original image *referenced* by the fetch URL?

    I am needing the MD5 of the transformed image that I get from the fetch URL.

    Either the ETAG is not that value OR the stream I am processing from the fetch URL is not exactly equivalent to the one used to compute the ETAG.

     

    0
    Comment actions Permalink
  • Avatar
    Daniel Mendoza

    Hi,

    The values should be the same from the MD5 and etag. Can you please open a support ticket at (https://support.cloudinary.com/hc/en-us/requests/new) and address it to me. Also, can you add the Cloudinary URLs examples you are calculating the MD5 signature for, and their associated md5 signature and etag. 

    I am looking forward to your ticket.

    0
    Comment actions Permalink
  • Avatar
    Don Birkenmeyer

    I did a standalone test of various methods of acquiring the MD5 (to test some black boxes in the process) and found an issue in third-party code that was the source of the issue.  So no worries on your part.

    I will note that the answer to my original question would have been and it bears repeating here for the next person looking into this:

    Examine the header "etag" in the HTTP GET (or HTTP HEAD) of the resource and it will contain a quoted HEX MD5 value string of the transformed original image suitable for verifying the acquired image stream.

    When using several common methodologies for acquiring an image from a URL/URI in Java, the header information is not supplied and was not apparent.

    Thanks for your help.

    0
    Comment actions Permalink

Please sign in to leave a comment.