PaloAltoNetworks / PaloAltoNetworks/docusaurus-openapi-docs

File download not start for some mimeType

Open
#734 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug roadmap
Dominant language
TypeScript
Stars
1.1k
Forks
315
Avg merge
7d 5h
Merged PRs (30d)
7

Description

Describe the bug

When we are calling an API endpoint that response with correct headers and content for download a file with certain extensions the download doesn't start.
The response has the Content-Disposition and Content-Type but they are ignored and instead of downloading, the file's content is displayed, probably because the mimetype is not handled correctly.

Expected behavior

The download of the file starts and is shown the response in the UI.

Current behavior

The download of the file doesn't start and is shown also the content in the response in the UI

Steps to reproduce

Pre-requirements: having an endpoint API that can be used to download every type of file.
Call that endpoint with UI

Screenshots

Example of p7m:

3f9fe7c7-1840-44f8-a0df-13006a938276

Example of txt:

79d2a9f9-0852-4f89-b5c7-75b581770f4e

Your Environment

  • Version used: v3.0.0-beta.4 (Docusaurus version 3.1.0)
  • Environment name and version:
    • Docusaurus side: Chrome Browser 122.0.6261.71 (Official build 64 bit);
    • BE side: SpringBoot BE engine and NGINX web server
  • Operating System and version (desktop or mobile): Windows 11 Desktop

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the download in the generated UI with the reported p7m and txt responses, using an endpoint that returns Content-Disposition and Content-Type. Trace the frontend response handling to find why the content is displayed instead of downloaded; done means both file types start a download while the response remains usable in the UI.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.