When the File Upload field doesn't have a max file size set, it would be nice to return the default value, which is most likely the server's value, instead of null for `maxFileSize`
Gytjarek opened this issue · 2 comments
What problem does this address?
By default, the GravityForms plugin shows the max file size message below the file upload field. When the value is not set manually in a field itself, GraphQL returns null instead of the default server value for maxFileSize
field. It would be nice to return the default value, or maybe even add a new field to indicate it's a default value.
What is your proposed solution?
Return the default server value instead of null
by wp_max_upload_size ()
What alternatives have you considered?
No response
Additional Context
No response
Thanks for the suggestion @Gytjarek - this would definitely be a useful change!
It would be nice to return the default value, or maybe even add a new field to indicate it's a default value.
Not entirely sure which approach is better. A default value on the same field is probably better for DX, but I'm always wary about deviating from GF's core behavior since that usually becomes the source of conflicts on future GF updates. 🤔
Thanks for the suggestion @Gytjarek - this would definitely be a useful change!
It would be nice to return the default value, or maybe even add a new field to indicate it's a default value.
Not entirely sure which approach is better. A default value on the same field is probably better for DX, but I'm always wary about deviating from GF's core behavior since that usually becomes the source of conflicts on future GF updates. 🤔
Yeah, I can imagine. I'm not sure which one is the best, but based on the GF plugin, they always show a message about the max file size, meaning they fallback to the default value if there is none set custom. I guess we have to do the same here. No need for the extra field. But it's just my opinion