image filename max_length is too short #1685

Closed
opened 2025-12-29 16:34:24 +01:00 by adam · 3 comments
Owner

Originally created by @nickzxcv on GitHub (Apr 20, 2018).

Issue type

[ X ] Feature request
[ ] Bug report
[ ] Documentation

Environment

  • Python version: 3.5.2
  • NetBox version: 2.3.2

Description

I want to attach the drawing of my cage sent to me by Equinix called "BLAHBLA - DC4 - Cage # 42360 - Cage, Cabinets, AC Power, Ladder Rack and Fiber Tray Layout - 4-1-17 v1.pdf"

I get the message "Ensure this filename has at most 100 characters (it has 107)."

Can the max_limit for this field please be increased to 200 maybe? I'd like to be able to keep the original filename if at all possible. Thanks!

Originally created by @nickzxcv on GitHub (Apr 20, 2018). ### Issue type [ X ] Feature request <!-- An enhancement of existing functionality --> [ ] Bug report <!-- Unexpected or erroneous behavior --> [ ] Documentation <!-- A modification to the documentation --> ### Environment * Python version: 3.5.2 * NetBox version: 2.3.2 ### Description I want to attach the drawing of my cage sent to me by Equinix called "BLAHBLA - DC4 - Cage # 42360 - Cage, Cabinets, AC Power, Ladder Rack and Fiber Tray Layout - 4-1-17 v1.pdf" I get the message "Ensure this filename has at most 100 characters (it has 107)." Can the max_limit for this field please be increased to 200 maybe? I'd like to be able to keep the original filename if at all possible. Thanks!
adam closed this issue 2025-12-29 16:34:24 +01:00
Author
Owner

@bellwood commented on GitHub (Apr 24, 2018):

100 characters is the default filefield maxlength but it can be adjusted in the model:

https://stackoverflow.com/questions/26575635/django-increase-filefield-length

https://docs.djangoproject.com/en/dev/ref/models/fields/#filefield

@bellwood commented on GitHub (Apr 24, 2018): 100 characters is the default filefield maxlength but it can be adjusted in the model: https://stackoverflow.com/questions/26575635/django-increase-filefield-length https://docs.djangoproject.com/en/dev/ref/models/fields/#filefield
Author
Owner

@nickzxcv commented on GitHub (Apr 25, 2018):

That's useful information that it would require a database schema change, and would require a migration defined. If its too much trouble, this can be closed.

@nickzxcv commented on GitHub (Apr 25, 2018): That's useful information that it would require a database schema change, and would require a migration defined. If its too much trouble, this can be closed.
Author
Owner

@jeremystretch commented on GitHub (May 4, 2018):

Let's stick with the default limit.

@jeremystretch commented on GitHub (May 4, 2018): Let's stick with the default limit.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#1685