Skip to content

Error downloading file  #2473

Closed as duplicate
Closed as duplicate

Description

@757566833

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):

Activity

  1. Koooooo-7 commented on Jul 25, 2024

    @Koooooo-7
    Member

    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.
  2. sy-records commented on Jan 6, 2025

    @sy-records
    Member

    I can't reproduce the problem under macOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions