Understanding hash_mismatch errors with Document Engine
PSPDFKit Server has been deprecated and replaced by Document Engine. To start using Document Engine, refer to the migration guide. With Document Engine, you’ll have access to robust new capabilities (read the blog for more information).
Question: What does the hash_mismatch
error response mean?
Answer:
When you upload documents from a URL, PSPDFKit Server calculates SHA256 hash of its contents and stores it in the database.
Since the file is stored in your infrastructure, PSPDFKit Server fetches it when necessary, e.g. in order to render it for viewing.
When the fetched document’s SHA256 doesn’t match the hash that was stored on upload, a hash_mismatch
error is returned.
To prevent this error, you must make sure that the URL you provided on upload always returns the exact same file.