[英]How to upload through django admin
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 admin
上單擊一下save
文件上傳到S3
。 我應該在哪里編寫uploading
到s3的方法。 我什么都不知道。
您可以嘗試django-storages
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.