Issue #2369✓ SolvedOpened November 2, 2019by timkelly08102 reactions

Where in the grapesjs code does it post an image to an upload endpoint?

Quick answerby artf2

@timkelly0810 to disable encoding just turn false this option ALL YOU NEED to know about uploading assets is here: https://grapesjs.com/docs/modules/Assets.html#uploading-assets

Read full answer below ↓

Question

My team and I built an application that uses grapesjs to build an email template. When pictures are introduced into the template they are automatically base64 encoded which was found to come from line 77 of: https://github.com/artf/grapesjs/blob/dev/src/asset_manager/config/config.js#L77. Since they are being base64 encoded and therefor cannot be directly sent to most email clients without being blocked, we were thinking about sending the images to our local database to be held there. We have noticed that when the url source of an image is used instead of the encoding, the images show in an email. So, where in the grapesjs code does it post an image to an upload endpoint? Are the headers automatically set by grapes or do we need to specify x-content-type, content-type, etc? Is there any documentation for uploading images to a database? Thank you.

Answers (3)

timkelly0810November 6, 2019

What does grapesjs send images to a database as? We are trying to determine how grapes sends images to spring so that we can set up our database to receive the incoming images.

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins →
Premium option

Premium plugins ship with support, regular updates, and production-ready features — save days of integration work.

Browse premium plugins →

Related tutorials

In-depth guides on the same topic.

All tutorials →

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.