I want to write a custom FieldType for Contour that acts a FileUpload control with some filters to restrict uploading to certain file types.
I tried to implement it following the example on http://www.nibble.be/?p=154 but I don't see how I can process (save) the uploaded file and store the file path in the record. The example is a simple textbox that seems to need no processing at all to store the value. But for my fileupload this does not work. I also tried to override the "function public override List<object> Values" but it did not work at all...
I saw that the developer docs are not yet updated so I wonder if it's possible to have the source code for the built in file upload FieldType. I guess this would help me to understand how to implement my own FieldType.
Contour 3 (Razor), Custom FieldType (FileUpload)
Hi,
I want to write a custom FieldType for Contour that acts a FileUpload control with some filters to restrict uploading to certain file types.
I tried to implement it following the example on http://www.nibble.be/?p=154 but I don't see how I can process (save) the uploaded file and store the file path in the record. The example is a simple textbox that seems to need no processing at all to store the value. But for my fileupload this does not work. I also tried to override the "function public override List<object> Values" but it did not work at all...
I saw that the developer docs are not yet updated so I wonder if it's possible to have the source code for the built in file upload FieldType. I guess this would help me to understand how to implement my own FieldType.
Thank you
Matthias
Comment author was deleted
Hi Matthias,
You'll need to do the saving in the ProcessValue method that you can overwrite
Here is the code from the default upload
Hi Tim,
Thank you for the code. I will try this.
Matthias
is working on a reply...