[Questions]: Download default assets in manager on init
Question
- I'm trying to implement an example as in a demo, namely: when clicking on a background image installation, a window pops up offering you to download files or select from already downloaded ones. Uploading to the server I successfully implemented, the files are loaded, saved in the desired folder, after they appear in the list of assets on the right, which you can click and apply to the background. But when updating the page and repeating all the above manipulations, the asset manager (the one on the left is empty).
As an example, by default, assets are specified as in the demo example (that is, pre-defined pictures with placehold.it), but again, the asset manager is always empty when opening.
The console displays a gjs-nl-asset with a list of specific images, but there are none in the resource list.
-
When opening the asset manager on the left, there is always a single semi-transparent image that I did not ask or load. How to remove it
-
For example, if you try to set a background image for "body", when you click on the icon with the plus of adding a background image, the message pops up in the console of the form htttp: //mysite.com/none, with the status 404 (Not Found) grapes.min.js:11 , so I understand that there is an attempt that download and what is not clear
I ask for help. Спасибо, Артур
Answers (3)
Hi @Barahten please try to provide a live demo for your issues, just can't help you without seeing how you set up the editor.
@artf, work on real server http://gjs.barahten.com/ Pen - https://codepen.io/barahten/pen/QBygdY
The script works a little strangely. On the local server it works by uploading files to the folder but does not work on adding to the manager, either after downloading, or after brutally adding through the code, at the same time on a real combat server everything works correctly except for p.3
Regarding the first point
But when updating the page and repeating all the above manipulations, the asset manager (the one on the left is empty).
First of all, update the library, 0.12.17 is too much outdated actually
BTW, just to give you an overview of how stuff supposed to work. At the beginning, your assets are loaded from what you have defined in config.assetManager.assets but if you have configured the StorageManager and you're fetching a JSON object like this { 'gjs-assets': [{ src: '' }, ...], ... } (gjs- is a default value from config.storageManager.id) your assets will be replaced by gjs-assets array, so take care of this flow.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #998
[BUG] Asset Manager sends empty request when uploading image
Description: GrapesJS editor is initialized in an editor.html file as follows: localhost:9001 is a local IIS server running PHP5. The conte...
Issue #1468
[bug] modaltitle no effect
Hello, I can't translate asset manager title to french. Example : assetManager: { storageType: '', storeOnChange: true, storeAfterUpload: t...
Issue #1369
[BUG] Class of a block doesn't always show in the classes section
Hello everyone, I have added many custom blocks and gave the same css class to all the images in those blocks. Let's call it for now 'image...
Issue #1418
[BUG?] Asset manager not deleting files on server unless upload triggered.
Running latest version (0.14.29) on local server. Using the example webpage preset. Ubuntu 18.04, Chromium 68. Assetmanager init: And exten...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.