Same as the example above, but it returns data as the
application/javascript
type.
The callback name should always be uploadcare_callback
. It should
receive the two following arguments: id
and a response object.
For original files, id is equivalent to their UUIDs.
For processed files, id
is equivalent to their URLs, excluding
the last operation, jsonp
.
File info response includes a value of a perceptual hash calculated using pixel contents of an image. Perceptual hashing is a common fingerprinting technique to quickly compare images and find duplicates or similar images. Uploadcare automatically calculates a 64-bit long perceptual hash value and returns it as a HEX string. It’s easy to find image duplicates by quickly comparing their perceptual hash values. To find similar images, it’s important to compare perceptual hash values bitwise (Hamming distance). A small number of unmatched bits (e.g., up to 8 bits) will correspond to subtle changes in the visual contents, while non-similar images will usually have more than 8 different bits.