react-email-editor icon indicating copy to clipboard operation
react-email-editor copied to clipboard

How to set images upload path?

Open 2K11CS12 opened this issue 4 years ago • 7 comments

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

2K11CS12 avatar Nov 01 '20 11:11 2K11CS12

https://docs.unlayer.com/docs/amazon-s3

essana3 avatar Nov 12 '20 11:11 essana3

can you give an example on vue? how to set it up?

mahfuzdiu avatar Dec 23 '20 06:12 mahfuzdiu

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.

jdavidbakr avatar Feb 11 '21 02:02 jdavidbakr

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.

jdavidbakr avatar Feb 12 '21 14:02 jdavidbakr

funnily enough, unroll-images-production is now being used for spam.

https://gist.github.com/andcam/0fd65c14e5c7301ce1d8095695f6b4d3

that you @2K11CS12 ?

andcam avatar Nov 17 '21 11:11 andcam

How do you do this in React ?

KevinMull avatar Jul 14 '22 16:07 KevinMull

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

AshwinNema avatar Aug 01 '22 05:08 AshwinNema