Multipart Viewer isn't displaying responses when boundary has uppercase letters and/or parts with no names
- Dominant language
- TypeScript
- Stars
- 40k
- Forks
- 2.4k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 61
Description
### Expected Behavior
A multipart response should be displayed, with each part showing on the Select Part Dropdown.
### Actual Behavior
If the multipart response's boundary has uppercase letters in it, the viewer will give this error: Failed to parse multipart response: stream ended unexpectedly.
If I make a custom plugin to fix the casing issue of the boundary, I still have a problem with the Select Part Dropdown in cases where the response parts don't have name/filename properties. There's no default name in the component, so it populates with blanks which then get collapsed into one option. So you can't select anything past part 1.

### Reproduction Steps
Submit a request to an API that returns a multipart response. In my case it's a soap service that returns a multipart/related response that can have one or more parts.
### Is there an existing issue for this?
- [x] I have searched the [issue tracker](https://www.github.com/Kong/insomnia/issues) for this problem.
### Which sync method do you use?
- [ ] Git sync.
- [ ] Insomnia Cloud sync.
- [ ] Local only
### Additional Information
I think the issue with the content type casing is in response-viewer.tsx where the ResponseMultipartViewer is returned using the contentType variable for the parameter. That variable is lower-cased by default. I think it should have been using originalContentType instead.
For the Select Part Dropdown, the selected item and list item text just needs a fallback if the part title is null. Like: {selectedPart.title || `Part ${selectedPart.id + 1}`}
I tested both of those fixes locally and it seems to work fine.
### Insomnia Version
11.0.0
### What operating system are you using?
Windows
### Operating System Version
Windows 11
### Installation method
Download from insomnia.rest
### Last Known Working Insomnia version
_No response_
Contributor guide
Research direction
Start in response-viewer.tsx and follow the ResponseMultipartViewer entry point, checking how contentType is passed and how unnamed parts are rendered in the Select Part dropdown. Verify the viewer with a multipart response whose boundary contains uppercase letters and whose parts lack name or filename values; done means the response parses and every part remains separately selectable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100