Can GrapesJS allow uploading arbitrary file through the built in asset manager?
Good question, I think the issue is the OpenAssets command itself that should be renamed in OpenImageAssets (indeed it renders only images types). So, what you can try to do is to create another command (eg. a more generic one or just for documents) and see if the customization works out for you. If you will see any p...
Read full answer below ↓Question
I looked at the asset manager code as well as the wiki and it seems like despite the docs claiming that the asset manager can handle uploading arbitrary files (i.e. by adding an arbitrary asset type), the actual asset manager code hardcodes file type image/* on the file input field of the file upload form https://github.com/artf/grapesjs/blob/d5f0ae94dfd801a8c13cc0f6ce33e209f98f1c65/src/asset_manager/view/FileUploader.js#L8 Is this a bug/oversight and indeed the asset manager code needs to be modified/hacked, or am I missing a way to configure the manager to accept the file types matching the...
Answers (3)
Good question, I think the issue is the OpenAssets command itself that should be renamed in OpenImageAssets (indeed it renders only images types). So, what you can try to do is to create another command (eg. a more generic one or just for documents) and see if the customization works out for you. I...
@artf I created the referenced pull request. I admit my motivation was my specific use case, but hopefully it was coded generically enough to be acceptable in the core editor codebase.
... oh and just to clarify - another chunk of code written alongside this pull request resides in a custom plugin of my project. It's a plugin that essentially does the following:Customises the Link DOM component such that upon creating a link via the RTE, the asset manager opens up at which point...
Related Questions and Answers
Continue research with similar issue discussions.
Issue #372
Asset Manager not automatically add images to assets after uploading
The JSON response of an upload is like this {"data":["http://url.com/flower.jpg"]} The response event is working.In the response event resp...
Issue #401
Cannot upload images
Hi, while uploading an image through asset manager, I get the following error: Assetmanager configuration at editor init looks like Folder...
Issue #769
Need further info to create backend for Asset Manager
I'm trying to figure out how to write a backend (in ASP.NET Core) for the Asset Manager. I've looked at a few of the Wiki pages, but still...
Issue #1226
Specifying tooltips
Hi, I've tried finding information about it in both the code as well as existing issues but either I looked for the wrong information or it...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins →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.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.