fore sure, but if that is the case, why store it in the same directory? or why rename the file at all? | [reply] |
I neither know, nor I care. But just because *I* wouldn't do it, or I cannot imagine why someone else does it, I'm not going to recommend a solution to a problem that may lead to lost data. I think it's very bad advice if on the question "how do I create unique filenames", one gives a solution that may lead to data loss.
| [reply] |
Correct me if I am wrong, but if you have filenames of the form user_nnnnn.jpg, and you rename them to the form user_md5.jpg, the only "loss of data" that could occur is if a user has uploaded the same file under two different names?
Or the 1 in 34 undecillion (billion, billion, billion) chance that the same user uploaded two different files that hashed to the same md5.
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
| [reply] [d/l] [select] |