django-quill-editor
django-quill-editor copied to clipboard
How can I configure django-quill-editor to save images in Amazon S3 and store Quill objects with the corresponding S3 URLs for the images?
QUILL_CONFIGS = {
"default": {
"image_upload_url": "/questions/quill-image-upload/",
"theme": "snow",
"modules": {
'history': {
'delay': 2000,
'maxStack': 500,
'userOnly': True
},
"syntax": True,
"toolbar": [
[
{"align": []},
"bold",
"italic",
"underline",
],
["image"],
["clean"],
],
# quill-image-compress
"imageCompressor": {
"quality": 0.8,
"maxWidth": 1000,
"maxHeight": 1000,
"imageType": "image/jpeg",
"keepImageTypes": [],
"ignoreImageTypes": ["image/webp"],
"debug": False,
"suppressErrorLogging": True,
},
# quill-resize
"resize": {
"showSize": True,
"locale": {},
},
},
},
}
This is my Quill config.
"image_upload_url": "/questions/quill-image-upload/",---- it is not working. Please help me
also interested for the solution
Django-Quill, will post the image in this format <img src="base64/........." />
i think you can make a parser to parse the result from the Quill input,
-
Get all the base64 image in the Quill input (QillField.conent).
-
Post the images to your s3 storage.
-
Get the values from the S3 storage.
-
and change the values of the base64 to the results of the s3 storage ex :
<img scr="base64/........." />
==><img scr="https://s3.my-storage.eu3........." />
hope it helps