Merge pull request #13833 from Pike/smaller-dry-run
Ignore .git store on Template uploads for editor and increase payload size to 10MB (fixes #12561)
This commit is contained in:
@@ -148,7 +148,8 @@ export async function createRouter(
|
||||
options: RouterOptions,
|
||||
): Promise<express.Router> {
|
||||
const router = Router();
|
||||
router.use(express.json());
|
||||
// Be generous in upload size to support a wide range of templates in dry-run mode.
|
||||
router.use(express.json({ limit: '10MB' }));
|
||||
|
||||
const {
|
||||
logger: parentLogger,
|
||||
|
||||
@@ -71,6 +71,10 @@ class WebDirectoryAccess implements TemplateDirectoryAccess {
|
||||
if (handle.kind === 'file') {
|
||||
yield new WebFileAccess([...basePath, handle.name].join('/'), handle);
|
||||
} else if (handle.kind === 'directory') {
|
||||
// Skip git storage directory
|
||||
if (handle.name === '.git') {
|
||||
continue;
|
||||
}
|
||||
yield* this.listDirectoryContents(handle, [...basePath, handle.name]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user