JCgH4164838Gh792C124B5 commented on pull request #435:
URL: https://github.com/apache/struts/pull/435#issuecomment-689100828


   Hi.
   
   Although it seems unlikely, there might be someone with a current use case 
for uploading empty files.  For this PR's change, maybe there should be a 
different error message string lookup for the new check added with this PR 
(e.g. "struts.messages.error.file.empty") to make it clear why the upload is 
being rejected ?
   
   Another idea might be to introduce a "minimumSize" property for the file 
upload that developers can configure (with a default of 0 or 1, depending on 
whether accepting empty files should be allowed by default).  That sort of 
feature could replace an empty guard with something configurable.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to