Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrupt Image #278

Closed
greyfoxjump opened this issue Apr 26, 2018 · 6 comments
Closed

Corrupt Image #278

greyfoxjump opened this issue Apr 26, 2018 · 6 comments

Comments

@greyfoxjump
Copy link

greyfoxjump commented Apr 26, 2018

Privacy.

@mikehaertl
Copy link
Owner

Could it be this: #270 ?

@mikehaertl
Copy link
Owner

The question is rather: Do you have mod_deflate or similar enabled in your webserver?

What you can also try: Compare the HTTP headers sent when you directly download the image you saved on the server to those when you use send().

@mikehaertl
Copy link
Owner

I can not help you with debugging HTTP headers. Each and every request and response has HTTP headers. So it's the first thing that comes to mind if there's a difference between saveAs() and d/l and send(). If the content is the same it can only be the headers that differ.

@mikehaertl
Copy link
Owner

I don't know either. It sounds very weird that you say saveAs() works while send() does not. Both use the same file (temporarily saved on disk). The one only copies the file to your saveAs-location and the other sends the file.

Try to call saveAs() and then send() the file for download and then compare the binary content. It must be the same.

I'm sorry, but I have no further ideas.

@mikehaertl
Copy link
Owner

Hmm, while it looks a bit hacky to me - if it works I'd say it's fine.

I'm sorry, that I can't offer more assistance. TBH I myself never used wkhtmltoimage and only added this as per request of another user. All this is vulonteers work, you know, so I can't guarantee that everything always works as it should and I don't have the time to fix each and every possible problem immediately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants