HTTPS corrupting downloads of Excel files
I’ve been having a problem with downloading Excel files when sending them to download to the browser using PHP in a custom plugin I’m working on. When WordPress HTTPS (SSL) is activated, .xls and .xlsx files are downloaded as corrupted (but other files such as PDF are fine), where as when I deactivate the WordPress HTTPS (SSL) plugin, the files download as normal (without being corrupted).
The Excel error message is “Excel cannot open this file. The file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file.”
I know this isn’t a SSL certificate problem as when I force the entire website to https, it still downloads correctly without corrupting the file. I’ve also checked the headers and they are identical in the corrupt and non-corrupt versions.
Any help or advice would be greatly appreciated!
- The topic ‘HTTPS corrupting downloads of Excel files’ is closed to new replies.