vbauer / manet

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

Add support for file:// URLs and/or rendering from HTML parameter #69

Closed aripringle closed 7 years ago

aripringle commented 7 years ago

Hi,

We have a use case where we need to take raw HTML and render a screenshot of it. Our existing process is to write the HTML to a temporary file and provide a file:// URL to a screenshot-generating app. It would be nice if we could use manet in the same fashion (we would have to ensure that our manet container has access to this temporary file, but that can be left up to the implementation).

Even more convenient might be if we could pass raw HTML and have manet render it (presumably this would need to be POST rather than GET). I'm not sure if this could be a potential security concern, but if so maybe it could be a feature that has to be specifically enabled.

aetherwu commented 7 years ago

I think it is pretty easy to setup a local server and render your html on it instead.

vbauer commented 7 years ago

I agree with @aetherwu I'm not sure about needs to take screenshots from local files, it could make some problems with security..

I suggest to close this ticket for now, and re-open if somebody needs it