Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

Downloading ZIP files results in a not commonly downloaded message

  • 3 trả lời
  • 1 gặp vấn đề này
  • 1 lượt xem
  • Trả lời mới nhất được viết bởi W1DJMartin

more options

Using PHP I have created a ZIP file that is then sent to the user using this snippet of code:

header('Content-Type: application/zip'); header('Content-Disposition: attachment; filename="Invoices.zip"'); header('Content-Length: 37725'); readfile('/Temp/Invoices/Invoices.zip');

Using FireFox Quantum 59.06b (64 bit) on Windows 10 I am prompted to "Save File" or "Open with" and Windows Explorer is the "Open with" default. If "Save File" is selected the ZIP file downloads and may be opened without a problem.

If "Open with" is selected with the default of Windows Explorer FireFox gives a warning about the ZIP file that shows the message in the image below. The "Remove file" choice does what you would expect. The "Open" option works and opens the ZIP file without error BUT the ZIP file is actually opened twice.

Chrome downloads the ZIP file without a problem and IE will download it or open it correctly without any messages.

The question is, why does FireFox think that a ZIP file is something that is not commonly downloaded and is there anything that may be changed about my download method that would make it stop complaining?

Using PHP I have created a ZIP file that is then sent to the user using this snippet of code: header('Content-Type: application/zip'); header('Content-Disposition: attachment; filename="Invoices.zip"'); header('Content-Length: 37725'); readfile('/Temp/Invoices/Invoices.zip'); Using FireFox Quantum 59.06b (64 bit) on Windows 10 I am prompted to "Save File" or "Open with" and Windows Explorer is the "Open with" default. If "Save File" is selected the ZIP file downloads and may be opened without a problem. If "Open with" is selected with the default of Windows Explorer FireFox gives a warning about the ZIP file that shows the message in the image below. The "Remove file" choice does what you would expect. The "Open" option works and opens the ZIP file without error BUT the ZIP file is actually opened twice. Chrome downloads the ZIP file without a problem and IE will download it or open it correctly without any messages. The question is, why does FireFox think that a ZIP file is something that is not commonly downloaded and is there anything that may be changed about my download method that would make it stop complaining?

Tất cả các câu trả lời (3)

more options

The image that didn't get included in the original question is shown here.

more options

First off "never" use beta software. Go back to FF release latest then try again and if problem happens report what happened.

more options

WestEnd said

First off "never" use beta software.

Never is a long time.

As developer I need to stay ahead of the game and this is a change in behavior which is why I'm asking about it. Furthermore, creating a CSV and having it open with Excel does not create the message and works as expected.