Hi I was just wondering if it's possible to validate file upload size in contour? has anyone done this with a custom workflow or is there something out of the box? I'm basically looking for a hook in point if it's possible?
I tried having a look at Code First forms in v3 but when I override Validate with:
public override IEnumerable<Exception> Validate()
It is never called on form submission when debugging
Trying to find documentation on the field types is also a bit difficult i.e. how would I check the input size of MrFile when MrFile is a string.. And how would we do drop downs with pre-values?:
You could do this client side, if you look for some examples it should be easy to port into a fieldtype(or just by adding some js to an existing contour form)
Just wondering if there is going to be some kind of provision for this in later version of contour? even the ability to redirect to an error page or postback with a flag if the upload contents exceed maxRequestLength?
Just wondering if there is going to be some kind of provision for this in later version of contour? even the ability to redirect to an error page or postback with a flag if the upload contents exceed maxRequestLength?
Well you could create a custom field type that takes care of providing feedback, no plans atm to include that but could you add it to issue tracker as a feature request? http://issues.umbraco.org/issues/CON
Validate File Upload Size?
Hi I was just wondering if it's possible to validate file upload size in contour? has anyone done this with a custom workflow or is there something out of the box? I'm basically looking for a hook in point if it's possible?
I tried having a look at Code First forms in v3 but when I override Validate with:
public override IEnumerable<Exception> Validate()
It is never called on form submission when debugging
Trying to find documentation on the field types is also a bit difficult i.e. how would I check the input size of MrFile when MrFile is a string.. And how would we do drop downs with pre-values?:
[Field(FormPages.MrPage, FormFieldsets.Details,
Type = typeof(FileUpload))]
public string MrFile{ get; set; }
Thanks
Comment author was deleted
You could do this client side, if you look for some examples it should be easy to port into a fieldtype(or just by adding some js to an existing contour form)
I thought you could only do it in a pretty hacky way client side in modern browsers only.
Any chance you know why the override for Validate isn't firing?
Comment author was deleted
Validate should fire, but make sure you are using the razor macro since usercontrol doesn't support it
Ohh i see and what if you're inserting in to rich text in a master page? will that use a user control macro?
Just wondering if there is going to be some kind of provision for this in later version of contour? even the ability to redirect to an error page or postback with a flag if the upload contents exceed maxRequestLength?
Just wondering if there is going to be some kind of provision for this in later version of contour? even the ability to redirect to an error page or postback with a flag if the upload contents exceed maxRequestLength?
Comment author was deleted
Well you could create a custom field type that takes care of providing feedback, no plans atm to include that but could you add it to issue tracker as a feature request? http://issues.umbraco.org/issues/CON
is working on a reply...