Reputation: 6248
I have a FileField()
in a Django model. On save()
, I intercept this and upload the actual file data to a remote-backend/Bucket, then save the URL returned from the service in another field.
The file actually uploads to my file-system (I believe).
How can I disable the FileField()
to not actually upload the file to wherever media is stored with Django?
Upvotes: 1
Views: 780
Reputation: 203
You could use upload_to
atttribute of FileField.
Reference: https://docs.djangoproject.com/en/2.2/ref/models/fields/#django.db.models.FileField.upload_to
Upvotes: 1