Changes between Initial Version and Version 1 of Ticket #32243, comment 6
- Timestamp:
- Feb 10, 2021, 9:39:25 AM (4 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #32243, comment 6
initial v1 4 4 > 5 5 > If yes, I will update the relevant codes implementing random name generation, otherwise, I will update the documentation mentioning `name` is required. However, I think we should not enforce the user to provide the `name` attribute. I would prefer to update the code. 6 **TL;DR:** Allow ContentFileswith a blank/None name. In `FileField.save()`, add a check after the `generate_filename()` call to make sure the file actually has a name once we're ready to save it to disk.6 **TL;DR:** Allow Files (not just ContentFiles) with a blank/None name. In `FileField.save()`, add a check after the `generate_filename()` call to make sure the file actually has a name once we're ready to save it to disk. 7 7 8 8 When saving the model it seems to still use the `upload_to` argument. If you pass something for `upload_to` it will overwrite whatever was passed for `name`.