-
Notifications
You must be signed in to change notification settings - Fork 3k
Duplicate filename allowed when upload files using S3 storage #21801
Copy link
Copy link
Open
Labels
netboxseverity: mediumResults in substantial degraded or broken functionality for specfic workflowsResults in substantial degraded or broken functionality for specfic workflowsstatus: needs ownerThis issue is tentatively accepted pending a volunteer committed to its implementationThis issue is tentatively accepted pending a volunteer committed to its implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application
Description
NetBox Edition
NetBox Community
NetBox Version
v4.5.5
Python Version
3.12
Steps to Reproduce
- switch to using S3 storage for image upload
- go to site and add an image attachment for a given file and choose "Create and Add Another"
- upload the same file again.
- check the uploaded image filenames in both image attachment and in Object Change
Expected Behavior
The images should have different filenames, when you do this using local file storage a unique value will be appended onto the filename to make it unique, for example:
site_28_action-buttons.png
site_28_action-buttons_sdmmer4.png
While having these names be the same causes no problem in the UI, the Object Change having the same name will cause issues with branching and is different behavior then when using local storage.
Observed Behavior
The file is uploaded in both places with the same name. Here is the object change records for both files:
name: ""
image: "image-attachments/site_28_action-buttons.png"
object_id: 28
description: ""
image_width: 1698
object_type: 57
image_height: 342
name: ""
image: "image-attachments/site_28_action-buttons.png"
object_id: 28
description: ""
image_width: 1698
object_type: 57
image_height: 342
as can be seen they are duplicated. On local file storage the second image will be:
name: ""
image: "image-attachments/site_28_action-buttons_sdmmer4.png"
object_id: 28
description: ""
image_width: 1698
object_type: 57
image_height: 342
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
netboxseverity: mediumResults in substantial degraded or broken functionality for specfic workflowsResults in substantial degraded or broken functionality for specfic workflowsstatus: needs ownerThis issue is tentatively accepted pending a volunteer committed to its implementationThis issue is tentatively accepted pending a volunteer committed to its implementationtype: bugA confirmed report of unexpected behavior in the applicationA confirmed report of unexpected behavior in the application