Hi everybody,
is ther any way to limit file upload size without acting at web.config level?
I mean is it there the possibility to evntually extend componet in order to block user upload when a certain size is reached or intecept upload and generate an error?
Thanks Aaron for you flesh answer. You are right, but how can I apply this approach to Umbraco From FileUpload field?
Maybe my question is silly, but I don't know how to do it.
FileUpload filed max size
Hi everybody, is ther any way to limit file upload size without acting at web.config level? I mean is it there the possibility to evntually extend componet in order to block user upload when a certain size is reached or intecept upload and generate an error?
Thanks for kind answer
The HttpPostedFileBase class has a property named ContentLength which can be used to determine file size.
More on HttpPostedFileBase here: https://msdn.microsoft.com/en-us/library/system.web.httppostedfilebase(v=vs.110).aspx
Thanks Aaron for you flesh answer. You are right, but how can I apply this approach to Umbraco From FileUpload field? Maybe my question is silly, but I don't know how to do it.
Thanks again
Hi GTona,
we've created a package which does exactly this: https://our.umbraco.com/projects/backoffice-extensions/umbraco-forms-on-perplex-steroids/.
Kind regards, Jeffrey
is working on a reply...