问题
documents = models.FileField(upload_to=settings.FILE_PATH, verbose_name=
_('Attach Your Documents'), help_text=_('.pdf file not exceeding 5 mb.'),
null=True, blank=True)
By this way i am creating a models for the upload
of a file in django admin
. Now I want to upload this file to S3
when some one click save
on django admin
. Where should i write the methods for uploading
to s3. I am not getting any idea.
回答1:
You could try django-storages
来源:https://stackoverflow.com/questions/4301824/how-to-upload-through-django-admin