Skip to content

Commit

Permalink
Increased max limit upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mbarrenechea committed Oct 26, 2023
1 parent 148409d commit 2fabf11
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 4 deletions.
9 changes: 9 additions & 0 deletions client/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ const nextConfig = {
images: {
domains: ["api.mapbox.com"],
},
// webpack: (config) => {
// // Fixes warning Critical dependency: the request of a dependency is an expression
// config.module = {
// ...config.module,
// exprContextCritical: false,
// };

// return config;
// },
};

export default nextConfig;
3 changes: 2 additions & 1 deletion client/src/components/map/layers/countries-layer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ const CountriesLayer = ({ beforeId, dataset, config, onAdd, onRemove }: Countrie
data: {
type: "FeatureCollection",
features: countriesData.data.data.map((c) => ({
...(c.attributes?.geometry as Feature),
type: "Feature",
geometry: c.attributes?.geometry as Feature["geometry"],
properties: {
id: c.id,
name: c.attributes?.name,
Expand Down
4 changes: 2 additions & 2 deletions client/src/constants/map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,6 @@ export const DEFAULT_MAP_SETTINGS: {
} = {
basemap: "basemap-light",
labels: "labels-dark",
boundaries: true,
roads: true,
boundaries: false,
roads: false,
};
12 changes: 11 additions & 1 deletion cms/config/middlewares.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,17 @@ export default [
'strapi::poweredBy',
'strapi::logger',
'strapi::query',
'strapi::body',
{
name: "strapi::body",
config: {
formLimit: "256mb", // modify form body
jsonLimit: "256mb", // modify JSON body
textLimit: "256mb", // modify text body
formidable: {
maxFileSize: 250 * 1024 * 1024, // multipart data, modify here limit of uploaded file size
},
},
},
'strapi::session',
'strapi::favicon',
'strapi::public',
Expand Down
5 changes: 5 additions & 0 deletions cms/config/plugins.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
module.exports = ({ env }) => ({
upload: {
config: {
sizeLimit: 250 * 1024 * 1024 // 256mb in bytes
},
},
'config-sync': {
enabled: true,
config: {
Expand Down

0 comments on commit 2fabf11

Please sign in to comment.