docsify icon indicating copy to clipboard operation
docsify copied to clipboard

Error downloading file

Open 757566833 opened this issue 1 year ago • 2 comments

Bug Report

Steps to reproduce

  1. docsify init ./docs
  2. make some file
  3. zip doc.zip image
  4. markdown
# Headline

> An awesome project.

<a href='doc.zip' download>download</a>
  1. npx docsify serve docs
  2. click download
  3. get http://localhost:3000/doc.zip

Current behaviour

When I use an tag in Markdown to download a file, clicking the link works correctly. However, when I try to download the file directly through the URL, it doesn't work correctly.

image

image download the file directly through the URL, the Content-Length returned by HTTP is incorrect.

Expected behaviour

Other relevant information

  • Docsify version:
  • [ ] Bug still occurs when all/other plugins are disabled?

  • Docsify plugins (if the bug happens when plugins enabled, please try to isolate the issue):

757566833 avatar Jul 25 '24 10:07 757566833

Hi @757566833 , thx for your report, it may similar to #1918, we gonna take a look on it.

cc @docsifyjs/reviewers Can reproduce on v4. Additionally:

  • Can not reproduce on run with python3 -m http.server 3000
  • Can not reproduce on dev branch.

Koooooo-7 avatar Jul 25 '24 16:07 Koooooo-7

I can't reproduce the problem under macOS.

sy-records avatar Jan 06 '25 04:01 sy-records