[BUG] Incorrect MIME Type Handling In /v1/api/usenet/createusenetdownload

When passing files rather than links that have parameters on the MIME type causes “Invalid file type. Please provide a valid nzb file.” type errors. An example of a valid MIME type that produces this error is “application/x-nzb;charset=utf-8”. Ideally it would respect or validate those parameters if present, but at the very least the type shouldn’t be considered invalid for having parameters.

At present I’m working around this by removing all the parameters myself. The current behavior causes
```
formData.set(“file”, await fetch(“url to get nzb from hydra”).then(r => r.blob()));
```
to fail because NZBHydra2 adds a charset parameter.

Please authenticate to join the conversation.

Upvoters
Status

Already Done

Board
🐛

Bugs

Date

6 months ago

Author

decoupled456

Subscribe to post

Get notified by email when there are changes.