﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
28554	Add support for multiple file fields	Johannes Maron	Johannes Maron	"The `django.db.models.FileField` currently allows only to store a single file URL.
This behavior seems outdated considering that `input[type=file]` supports a `multiple`  attribute, which is supported by all major Browsers.
See: https://www.w3schools.com/tags/att_input_multiple.asp

I would suggest to have a similar attribute on the database field itself, as well as on the form field and widget.

The major point for discussion would be how to store the data. The easiest would be to coma separate the paths in a single char field. The major concern here would be the lack of atomicity. For databases like Postgres I would be sensical to use the `ArrayField` as an underlying structure. Another way for serialisation would be the use of JSONs in a char field.

All solutions based on a text or char field have an issue related to the compatibility with the current `FileField` which is limited to 100 characters. The type would need to be migrated to a text type or the length would need to be increased. The latter options bares the question to which point.

Another approach would be to defer the storage issue and only provide support for multiple files on form level.
This would mean to add a `multiple` attribute to the form field and widget. Users would be able to create forms with multiple files in a single field and handle storage according to their preference."	New feature	assigned	File uploads/storage	dev	Normal		file, storage, upload, multiple, input	info@…	Accepted	1	0	0	1	0	0
