Multiple files upload in Scripts #7548

Closed
opened 2025-12-29 20:25:00 +01:00 by adam · 5 comments
Owner

Originally created by @dainok on GitHub (Jan 22, 2023).

NetBox version

v3.4.2-dev

Feature type

Change to existing functionality

Proposed functionality

Script FileVar is supporting single file upload only. Django FileFieldForm now supports multiple files:

https://docs.djangoproject.com/en/4.1/topics/http/file-uploads/#uploading-multiple-files

Netbox FileVar should reflect Django FileFieldForm .

See also: https://github.com/netbox-community/netbox/issues/11536

Use case

If Scripts can be executed once with multiple files, currently user has to start the Script multiple times.

Database changes

No response

External dependencies

No response

Originally created by @dainok on GitHub (Jan 22, 2023). ### NetBox version v3.4.2-dev ### Feature type Change to existing functionality ### Proposed functionality Script FileVar is supporting single file upload only. Django FileFieldForm now supports multiple files: https://docs.djangoproject.com/en/4.1/topics/http/file-uploads/#uploading-multiple-files Netbox FileVar should reflect Django FileFieldForm . See also: https://github.com/netbox-community/netbox/issues/11536 ### Use case If Scripts can be executed once with multiple files, currently user has to start the Script multiple times. ### Database changes _No response_ ### External dependencies _No response_
adam added the type: feature label 2025-12-29 20:25:00 +01:00
adam closed this issue 2025-12-29 20:25:00 +01:00
Author
Owner

@jeremystretch commented on GitHub (Mar 16, 2023):

Netbox FileVar should reflect Django FileFieldForm .

It's not as simple as this. Scripts written using FileVar assume a single file object as input. Any changes will need to ensure backward-compatibility with the current behavior. What is the specific change you're proposing?

@jeremystretch commented on GitHub (Mar 16, 2023): > Netbox FileVar should reflect Django FileFieldForm . It's not as simple as this. Scripts written using FileVar assume a single file object as input. Any changes will need to ensure backward-compatibility with the current behavior. What is the specific change you're proposing?
Author
Owner

@dainok commented on GitHub (Mar 16, 2023):

@jeremystretch in my idea it should be possible to maintain backward-compatibility, returning a file as a default, or a list of file if more files are uploaded.
I tried to go deeper, but I lost myself reading the code.

@dainok commented on GitHub (Mar 16, 2023): @jeremystretch in my idea it should be possible to maintain backward-compatibility, returning a file as a default, or a list of file if more files are uploaded. I tried to go deeper, but I lost myself reading the code.
Author
Owner

@jeremystretch commented on GitHub (May 3, 2023):

Native support for multi-file upload was added in Django 4.2, so I'm going to mark this as blocked by #12237 for now.

@jeremystretch commented on GitHub (May 3, 2023): Native support for multi-file upload was [added in Django 4.2](https://docs.djangoproject.com/en/4.2/topics/http/file-uploads/#uploading-multiple-files), so I'm going to mark this as blocked by #12237 for now.
Author
Owner

@github-actions[bot] commented on GitHub (Mar 27, 2024):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Mar 27, 2024): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@jeremystretch commented on GitHub (Mar 27, 2024):

As NetBox now has the ability to synchronize custom scripts from remote data sources I don't believe there's still a strong need for the ability to upload multiple scripts at once. It would also greatly complicate the logic for validating scripts as they are uploaded.

@jeremystretch commented on GitHub (Mar 27, 2024): As NetBox now has the ability to synchronize custom scripts from [remote data sources](https://docs.netbox.dev/en/stable/features/synchronized-data/) I don't believe there's still a strong need for the ability to upload multiple scripts at once. It would also greatly complicate the logic for validating scripts as they are uploaded.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#7548