[PR #17788] [MERGED] Fixes: #17740 - Add webp to the list of acceptable extensions for handling filenames in image_upload #15198

Closed
opened 2025-12-30 00:20:33 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/17788
Author: @bctiemann
Created: 10/16/2024
Status: Merged
Merged: 10/16/2024
Merged by: @jeremystretch

Base: developHead: 17740-add-webp-to-image_upload-develop


📝 Commits (1)

  • 664526d Add webp to the list of acceptable extensions for handling filenames in image_upload

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 netbox/extras/utils.py (+1 -1)

📄 Description

Fixes: #17740

This ensures that image files with a .webp extension will be handled the same way as png, jpg, jpeg, etc. in that the appropriate extension will be appended to the saved file in media.

This addresses a knock-on issue raised in #17740 that a filename with multiple dots will have the rightmost dotted segment treated as the "extension", resulting in a (seemingly) unopenable file after download from NetBox.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/17788 **Author:** [@bctiemann](https://github.com/bctiemann) **Created:** 10/16/2024 **Status:** ✅ Merged **Merged:** 10/16/2024 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop` ← **Head:** `17740-add-webp-to-image_upload-develop` --- ### 📝 Commits (1) - [`664526d`](https://github.com/netbox-community/netbox/commit/664526de546e8cf0d861bc17246379fcc084ef92) Add webp to the list of acceptable extensions for handling filenames in image_upload ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `netbox/extras/utils.py` (+1 -1) </details> ### 📄 Description ### Fixes: #17740 This ensures that image files with a `.webp` extension will be handled the same way as `png`, `jpg`, `jpeg`, etc. in that the appropriate extension will be appended to the saved file in `media`. This addresses a knock-on issue raised in #17740 that a filename with multiple dots will have the rightmost dotted segment treated as the "extension", resulting in a (seemingly) unopenable file after download from NetBox. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 00:20:33 +01:00
adam closed this issue 2025-12-30 00:20:34 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15198