vbauer / manet

Website screenshot service powered by Node.js, SlimerJS and PhantomJS
MIT License
575 stars 102 forks source link

Use crypto module to limit file name length with sha1 #39

Closed pCyril closed 8 years ago

pCyril commented 8 years ago

Fixes #10

10 issue is well known and seems to impact a lot of users of this library.

We tried Manet in our stack and, while being an amazing project, it does sadly fail on a large number of URL which are too long. This PR represents an easy way to fix that issue.

Sha1 algorithm, even if could give some collisions in theory seems a good compromise between simplicity and efficiency.

tejerka commented 8 years ago

+1 awsome

neverdane commented 8 years ago

+1

snapeuh commented 8 years ago

+1

sha1 seems to be a great solution to reduce collisions to a minimum.

vbauer commented 8 years ago

Thank you for this PR! I think could close eyes on some rare collisions, but it will work in most cases.

malayladu commented 7 years ago

Still facing this issue with the latest version of Manet.

Trying to take a screenshot of http://nntcwireless.com. But, getting the following error.

Error while sending data file: ENOENT: no such file or directory, stat '/var/folders/p1/871j7rg57lx69sfdvfpdz1780000gp/T/25e88d88660c6207d5642720de78de312797875b.png'