mjml4 support moved to a separate package

support for file handling in grapesjs
This commit is contained in:
Tomas Bures 2018-11-10 19:40:20 +01:00
parent 9f467762c0
commit b089993360
15 changed files with 136 additions and 10242 deletions

View file

@ -24,7 +24,7 @@ users.registerRestrictedAccessTokenMethod('grapesjs', async ({entityTypeId, enti
return {
permissions: {
'template': {
[entityId]: new Set(['manageFiles', 'view'])
[entityId]: new Set(['viewFiles', 'manageFiles', 'view'])
}
}
};
@ -51,6 +51,13 @@ function getRouter(appType) {
publicPath: getSandboxUrl()
});
});
fileHelpers.installUploadHandler(router, '/upload/:type/:entityId', files.ReplacementBehavior.RENAME, null, 'file', resp => {
return {
data: resp.files.map( f => ({type: 'image', src: f.url}) )
};
});
}
return router;