DEV Community

Discussion on: I build a Website Screenshot API, curious what you guys think!

Collapse
 
edent profile image
Terence Eden

Great service! The default filenames seem to be random characters - and I couldn't work out how to change them. Can I suggest making the filename similar to the URL? Maybe with a timestamp to prevent duplication?

Collapse
 
jdcauley profile image
Jordan Cauley • Edited

{url_name}.{radom_token}.ext is often a solid simple way to go

Token could be an md5 of the file contents

Collapse
 
dirk94 profile image
Dirk Hoekstra

Thanks for the suggestion, after thinking about it I agree that the random character filenames aren't the most user-friendly. I updated the system to use {url_name}-{random_token} 🚀