Changes between Initial Version and Version 1 of Ticket #32243, comment 6


Ignore:
Timestamp:
Feb 10, 2021, 9:39:25 AM (4 years ago)
Author:
Jesse

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #32243, comment 6

    initial v1  
    44>
    55> 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 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.
     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.
    77
    88When 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`.
Back to Top