Closed tefkah closed 1 year ago
Great idea. I've added you as a contributor. Create a pull request to the main branch. Just make sure to tag it to v1.1.
I would just like to make one small change to your idea. Make it configurable. So that this check can be enabled/disabled in the config file.
Contact me if you have any issues.
What happened to this? Was it merged anywhere?
@cortopy I was using this workaround using patch-package
. Saw your response, so I figured I could also just create a PR using the solution provided by @tefkah.
Hi! Thanks for the package, works like a charm when uploading new images!
I noticed however that when, say, updating the title of an image, the hash would not get updated. this is because the
beforeUpdateData
looks like this.I get that that may be the indented behavior, but I wanted a way to easily generate hashes for existing images without having to reupload everything.
For anyone like me, replace the code in
bootstrap.js
with the following and runpatch-package
for that result. If the image is newly created/uploaded, it will work as usual. If not, it will get the full data from the db, check if there already is a hash for it, and if not generate one.