Upload config applied to non-upload requests #2274
Replies: 2 comments
-
Hey @khakimvinh — this is actually working as intended, and I think the confusion stems from the way that the top-level config property is named. This limit is used within the Is this preventing you from achieving something that you need? We could try and scope this middleware only to the endpoints that accept uploads (collection create / update) but I believe there were some additional complexities in that which is why we kept the I will convert this to a discussion since it's technically as intended, although I will tag it as a feature request. We'd love to know if you need this functionality - - and why, and from there, we can prioritize the change. Let us know! |
Beta Was this translation helpful? Give feedback.
-
Hi @jmikrut, thanks for the input. For example, right after cloning the ...
upload: {
limits: {
fieldSize: 128,
},
},
... Then even create |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Bug Report
When defining
upload
config inpayload.config.ts
, the config limit will also be applied to non-upload requests.Steps to Reproduce
upload
config topayload.config.ts
, for example:ERROR (payload): SyntaxError: Unterminated string in JSON at position 256
Other Details
Tested on version: 1.6.17
Cloned
payload-demo
and reproduce the error: https://github.com/khakimvinh/payload-upload-bug.gitBeta Was this translation helpful? Give feedback.
All reactions