react-email-editor
react-email-editor copied to clipboard
How to set images upload path?
Hi,
I have configured react-email-editor, it's working fine. Whenever I upload image it uploads on https://unroll-images-production.s3.amazonaws.com....
I want upload images on my local server or my own s3 bucket.
Can you please guide me how can I achieve this?
Thanks
https://docs.unlayer.com/docs/amazon-s3
can you give an example on vue? how to set it up?
Same issue here, I am sure that the owner of unroll-images-production probably doesn't want everyone to use their account? I already store all of my media for this client in S3, so would like to just use the same bucket they are using for everything else, but can't find in the documentation how to change the upload destination.
Found it in another issue thread - here is what you do (in vue, very likely similar in react but I don't know react's syntax):
this.$refs.emailEditor.editor.registerCallback('image', function(file, done) {
// Do something to upload the image and return the URL of the uploaded image
done({url:[the-image-url]})
});
I added this to the editorLoaded()
function in my component.
funnily enough, unroll-images-production is now being used for spam.
https://gist.github.com/andcam/0fd65c14e5c7301ce1d8095695f6b4d3
that you @2K11CS12 ?
How do you do this in React ?
How do you do this in React ?
Go to this link https://docs.unlayer.com/docs/amazon-s3 and configure aws accordingly and after that pass projectId in the react-editor-component. You can see the documentation reacthttps://github.com/unlayer/react-email-editor. There is an option to pass projectId