DEV Community

Discussion on: CKEditor Image upload with Firebase and React

Collapse
 
devalo profile image
Stephan Bakkelund Valois

I made a working solution to this. I'm pushing the file.name from your module into a root array, and taking substrings from the editor.getData() which only consists of image names. On create, I check both these arrays up against each other, and delete the images from storage that haven't been used.

This way, all the images will be temporarily until the user clicks save.
One edge case if if the user leaves the editor before the save is pressed. This also needs to be handled by deleting all images that has been uploaded temporarily.

Collapse
 
dhirajverma_in profile image
Dhiraj Verma

Hi Stephan. could you please tell me file repo. or any git hub link for this. please.

Collapse
 
anildharni profile image
Anil Dharni

Hi Stephan, I am stuck here. Could you please tell me how you achieved this using a code snippet?
Thank You.