从django直接上传到S3 [英] Upload directly to S3 from django

查看:115
本文介绍了从django直接上传到S3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我真的困在这里。

我想能够从django表单直接上传到S3。
这将用于保存显示图片。

I want to be able to upload directly to S3 from a django form. This is going to be used to hold display pictures.

我遵循: http://django-storages.readthedocs.org/en/latest/backends/amazon-S3.html

但不幸的是我加入了

DEFAULT_FILE_STORAGE = 'storages.backends.s3.S3Storage'

到settings.py。 django甚至不认识我所做的改变。 (我更改为DEFAULT_FILE_STORAGE ='asdsfsdfsdf',甚至没有给出错误
有趣的是,我甚至不知道django-storages是否具有我正在寻找的功能。 p>

to settings.py for some reason. django doesn't even recognize the change that i have made. (I changed it to DEFAULT_FILE_STORAGE = 'asdsfsdfsdf' and it didn't even give an error. The funny thing is that I don't even know if django-storages has the feature i'm looking for.

推荐答案

这是我曾经写过的一个工作示例, django-s3upload

这篇关于从django直接上传到S3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆