M
M
metallix2016-11-24 15:09:19
PHP
metallix, 2016-11-24 15:09:19

Why doesn't Chrome on iOS download a zip archive?

Hello. There is the following problem.
When clicking on the link, the user should be given an archive with files. In all browsers everything works fine,
except for Chrome on iOS (iPad Mini) - the error 'Download failed, and Dolphin - 'Cannot determine file size' falls out
Although all the headers seem to be set correctly -

header('Pragma: public');
                        header('Expires: 0');
                        header('Cache-Control: no-cache');
                                          
                        header('Content-Description: Download');      
                                                
                        header('Content-Type: application/zip');
                        header('Content-Disposition: attachment; filename="crazypatterns_' . $product->id . '.zip"');
                        header('Content-Transfer-Encoding: binary');
                        header('Content-Length: '.filesize($filePath));

                        readfile($filePath);

I also tried changing the Content-Type to 'octet-stream' - to no avail.
The first few pages of Google were shoveled and various options were tried, but to no avail.
Has anyone come across this before and can suggest a possible solution?
UPD: Example

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question