[Fixed]-I want a Django user to upload an arbitrary number of files

1👍

This problem does not apply solely to files, but to any case where you want the user to add an arbitrary number of any piece of data. And the solution is the same: define a separate table with a ForeignKey to the user.

class UserUpload(models.Model):
    file = models.FileField(...)
    description = models.CharField(...)
    user = models.ForeignKey(User)

Now you can get all a user’s uploads with user.userupload_set.all().

Leave a comment