Fixed sandbox. Multiple tabs work now.
WiP on selectable mosaico templates. TODO: Make files always point to trusted URL, such that we don't have to rebase them. They are public anyway. The same goes for mosaico endpoints: /mosaico/templates and /mosaico/img
This commit is contained in:
parent
a4ee1534cc
commit
7788b0bc67
79 changed files with 724 additions and 390 deletions
|
@ -10,9 +10,9 @@ const multer = require('multer')({
|
|||
dest: uploadedFilesDir
|
||||
});
|
||||
|
||||
function installUploadHandler(router, url, dontReplace = false) {
|
||||
function installUploadHandler(router, url, getUrl = null, dontReplace = false) {
|
||||
router.postAsync(url, passport.loggedIn, multer.array('files[]'), async (req, res) => {
|
||||
return res.json(await files.createFiles(req.context, req.params.type, req.params.entityId, req.files, dontReplace));
|
||||
return res.json(await files.createFiles(req.context, req.params.type, req.params.entityId, req.files, getUrl, dontReplace));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue