Issue #372💬 AnsweredOpened October 4, 2017by deffrin0 reactions

Asset Manager not automatically add images to assets after uploading

Quick answerby sonnylloyd

I have the same problem and like you i added the files manually. just in case someone else looks at this and needs to achieve the same thing manually my response looks like this @artf i believe the issue here is inside src\asset_manager\view\FileUploader.js you have on line 77 inside onUploadResponse(text) this should...

Read full answer below ↓

Question

The JSON response of an upload is like this {"data":["http://url.com/flower.jpg"]}

The response event is working.In the response event response is in the format of string. Content-type is set to application/json when uploaded file.

Now I manually add image to assets in the response event. Is there any problem in the response format I get after a file upload?

Answers (3)

sonnylloydOctober 4, 2017

I have the same problem and like you i added the files manually. just in case someone else looks at this and needs to achieve the same thing manually my response looks like this @artf i believe the issue here is inside src\asset_manager\view\FileUploader.js you have on line 77 inside onUploadRespon...

artfOctober 4, 2017
typeof text === 'text' 

LOL Yeah I'd say it's definitely the reason behind the bug Would you like to PR it? :)

sonnylloydOctober 4, 2017

@artf thanks i have sent a PR

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.