P
P
PiggyPig2017-07-27 02:10:25
Django
PiggyPig, 2017-07-27 02:10:25

How to rename image name in md5 with existence checks?

Hello!
Please help with writing a function that converts the image name to md5.
When editing the model for the image name, as I understand it, the same hash will be generated again. I saw checks for matches, where if True, a file with the same hash is deleted. However, the fact that sometimes different names can give the same hash makes it more difficult. And what to do then, because you can delete a completely different file?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pcdesign, 2017-07-27
@pcdesign

a function that converts the image name to md5

And why put the name of the image in md5 when you can put the entire image (file) in md5:
https://stackoverflow.com/questions/3431825/genera...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question