将 S3 上传/浏览与 django-tinymce 集成
我一直在寻找有关如何将 Amazon S3 与 TinyMCE 集成的资源。到目前为止,我想到的最好的链接是: http://forums.aurigma.com/yaf_postst4033_Amazon-S3-File-Manager-for-TinyMCE-and-CKEditor.aspx
有人有将其集成到 Django 应用程序中的经验吗?如果没有,有哪些用于富文本编辑和从 S3 提取图像的替代解决方案?
I've been searching for resources on how to integrate Amazon S3 with TinyMCE. The best link I've come up with so far is: http://forums.aurigma.com/yaf_postst4033_Amazon-S3-File-Manager-for-TinyMCE-and-CKEditor.aspx
Does anyone have any experience integrating this into a Django app? If not, what are some alternative solutions for rich text editing and pulling in images from S3?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果有人最近像我一样搜索了这个,并且需要一个解决方案来让 django-tinymce4-lite 与 django-storages 和 django-filebrowser-no-grappelli 一起工作,我已经设法通过执行以下操作来使其工作:
1)按照这个优秀的教程:https://karansthr.gitlab.io/fosstack/ how-to-set-up-tinymce-in-django-app/
2) 当涉及到让 s3 部分工作时,你需要安装 django-storages 并设置按照此处中的说明设置媒体存储
3)您需要创建 S3Boto3Storage 的子类并将其设置为 DEFAULT_FILE_STORAGE ,如下所示:
4) 在该模块内创建 MediaStorage 类使用以下 API 来使用 FileBrowser
5) 确保将这些放入您的 Django 设置中:
希望这会有所帮助
If someone has searched this recently as I have and needs a solution to get django-tinymce4-lite working with django-storages and django-filebrowser-no-grappelli, I've managed to get it working by doing the following:
1) Follow this excellent tutorial: https://karansthr.gitlab.io/fosstack/how-to-set-up-tinymce-in-django-app/
2) When it comes to getting the s3 part working you'll need to install django-storages and set up you mediastorages as described in the instructions here
3) You'll need to create a subclass of S3Boto3Storage and make that your
DEFAULT_FILE_STORAGE
as below:4) And inside that module create the MediaStorage class with the following API to work with FileBrowser
5) Make sure to put these in your Django Settings:
Hope this helps
我最终使用了django-storages。工作完美。
I ended up using django-storages. Works perfectly.