Question

Suppose I have a form in my web application where users can upload a profile picture.

I've got few requirements about file size, dimensions etc, but when the user uploads the image, how should I name them on my system? I suppose it would need to be consistent and also unique.

Maybe a GUID?

a5c627bedc3c44b7ae7c06a44fb3fcf8.jpg

A timestamp?

129899740140465735.jpg

A hash? Ex: md5

b1a9acaf295cf14ffbc5b6538294562c.jpg

Is there a standard or recommended way to do this?

No correct solution

Licensed under: CC-BY-SA with attribution
scroll top