如何通过django管理员上传 [英] How to upload through django admin
本文介绍了如何通过django管理员上传的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
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)
通过这种方式,我可以在 django admin
中为文件的 upload
创建模型.现在,当有人单击 django管理员
上的 save
时,我想将此文件上传到 S3
.我应该在哪里写 uploading
到s3的方法.我什么都不知道.
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.
推荐答案
您可以尝试 django-存储
这篇关于如何通过django管理员上传的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文