[PR #17785] [CLOSED] Fixes: #17740 - Add webp to the list of acceptable extensions for handling filenames in image_upload #15195

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/17785
Author: @bctiemann
Created: 10/16/2024
Status: Closed

Base: featureHead: 17740-add-webp-to-image_upload


📝 Commits (10+)

  • e7bd0e5 Closes #17776: Add support for different HTTP methods to HTMXSelect
  • 35307d2 17468 add warning to documentation about overriding custom script properties
  • aa3f4cb 17710 remove cached fields from CableTermination GraphQL
  • e8e95f5 Add job timeout handling in JobRunner for periodic jobs
  • 532dbab Fixes #17749: Add missing graphql fields
  • 82de559 17754 fix per-page on version history (#17766)
  • 27fcb8e Add webp to the list of acceptable extensions for handling filenames in image_upload
  • a320bda 16136 remove Django Admin (#17619)
  • cfb23ad 16783 Add status field to InventoryItem (#17627)
  • 0544189 17195 Add color to PowerOutlet (#17623)

📊 Changes

8 files changed (+19 additions, -6 deletions)

View changed files

📝 docs/customization/custom-scripts.md (+3 -0)
📝 netbox/dcim/graphql/types.py (+2 -1)
📝 netbox/extras/utils.py (+1 -1)
📝 netbox/netbox/jobs.py (+2 -0)
📝 netbox/templates/core/plugin.html (+3 -2)
📝 netbox/tenancy/graphql/types.py (+2 -0)
📝 netbox/utilities/forms/widgets/select.py (+5 -2)
📝 netbox/wireless/graphql/types.py (+1 -0)

📄 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/17785 **Author:** [@bctiemann](https://github.com/bctiemann) **Created:** 10/16/2024 **Status:** ❌ Closed **Base:** `feature` ← **Head:** `17740-add-webp-to-image_upload` --- ### 📝 Commits (10+) - [`e7bd0e5`](https://github.com/netbox-community/netbox/commit/e7bd0e53d78809f430c8dafaacded4a52d6c7438) Closes #17776: Add support for different HTTP methods to HTMXSelect - [`35307d2`](https://github.com/netbox-community/netbox/commit/35307d213f98a254442a843726e0610c13db5e3f) 17468 add warning to documentation about overriding custom script properties - [`aa3f4cb`](https://github.com/netbox-community/netbox/commit/aa3f4cb5f5ba18f2876db92976b76acaa9582502) 17710 remove cached fields from CableTermination GraphQL - [`e8e95f5`](https://github.com/netbox-community/netbox/commit/e8e95f5e97a684fd26d04289f86e3dbce8ac29cc) Add job timeout handling in JobRunner for periodic jobs - [`532dbab`](https://github.com/netbox-community/netbox/commit/532dbabbab8352188c07b041a27e32bc035c2f1b) Fixes #17749: Add missing graphql fields - [`82de559`](https://github.com/netbox-community/netbox/commit/82de559317645bea76dd44d50449e27c6f6c2ed2) 17754 fix per-page on version history (#17766) - [`27fcb8e`](https://github.com/netbox-community/netbox/commit/27fcb8edf3deee0db8e2fab8832c240896b2372f) Add webp to the list of acceptable extensions for handling filenames in image_upload - [`a320bda`](https://github.com/netbox-community/netbox/commit/a320bdacb468a43792df8cf7954e44fbe98fd106) 16136 remove Django Admin (#17619) - [`cfb23ad`](https://github.com/netbox-community/netbox/commit/cfb23ad8c003f3f6adcd37b1a4a777e6cc535353) 16783 Add status field to InventoryItem (#17627) - [`0544189`](https://github.com/netbox-community/netbox/commit/0544189e2e954d30f327f5ee35ac5b769d7857fb) 17195 Add color to PowerOutlet (#17623) ### 📊 Changes **8 files changed** (+19 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `docs/customization/custom-scripts.md` (+3 -0) 📝 `netbox/dcim/graphql/types.py` (+2 -1) 📝 `netbox/extras/utils.py` (+1 -1) 📝 `netbox/netbox/jobs.py` (+2 -0) 📝 `netbox/templates/core/plugin.html` (+3 -2) 📝 `netbox/tenancy/graphql/types.py` (+2 -0) 📝 `netbox/utilities/forms/widgets/select.py` (+5 -2) 📝 `netbox/wireless/graphql/types.py` (+1 -0) </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:32 +01:00
adam closed this issue 2025-12-30 00:20:32 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15195