Calculate Hash in FILE Uploaded

Does anyone know how to calculate the hash of a file uploaded to bubble? And then insert it in another field to validate whether it is the same or not.

You’ll need to bring in an external tool or API since Bubble doesn’t have a built-in hashing feature. So you could set up an API that takes the file’s URL and returns a hash, like SHA-256. You can store that hash in a field and later compare it when needed.

It’s pretty straightforward—just use Bubble’s API Connector to send the file to a hashing service, grab the hash, and save it

I’ve tried several APIs but none of them work with PDF files. Could you suggest something to me?

I think if you want to calculate the hash of a file in Bubble, use a plugin or the Toolbox plugin with JavaScript to generate the hash (e.g., SHA-256). Save the hash in a database field and compare it later with the hash of any new upload to validate.

1 Like