How to upload through django admin

蹲街弑〆低调 提交于 2019-12-24 10:36:04

问题


    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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!