Hi Denuwanthi, The ES will first scan for any file fields and put them in the ES storage.After which the options object is augmented with the name of the field and a storage UUID before being passed to the asset create method.if the file field is not found in the RXT definition it is ignored.In this case the wsdl_zip field is not defined in the RXT definition and is a file field.
In order to by pass this behaviour you will need to implement a custom API endpoint and invoke your asset create logic. Thank You, Sameera On Tue, Dec 16, 2014 at 11:55 PM, Denuwanthi De Silva <denuwan...@wso2.com> wrote: > > Hi, > > In the custom asset extension I'm working on, I have a requirement to > support file upload. > > Thus, in my overridden partial (create_form.hbs) I use > <input type='*file*' name='*wsdl_zip*' id='*wsdl_zip*' /> > to get the html view of the file uploader. > > Then, in my extension's asset.js inside 'create' method, I try to access > the value taken by that html element by using, > > *options.wsdl_zip* > > But, when I actually browse file and log the above value, it prints 'null' > and the 'options' json object does not even contain 'wsdl_zip' attribute. > > If I use a text field instead of using type 'file', > > <input type='text' name=wsdl_zip' id='wsdl_zip' /> > > > options.wsdl_zip returns the value I entered in the text field. > > So, what could be the reason for not retrieving 'file' type inputs ? > Any other configurations need to be done? > > Thanks, > -- > Denuwanthi De Silva > Software Engineer; > WSO2 Inc.; http://wso2.com, > Email: denuwan...@wso2.com > > > -- Sameera Medagammaddegedara Software Engineer Contact: Email: samee...@wso2.com Mobile: + 94 077 255 3005
_______________________________________________ Dev mailing list Dev@wso2.org http://wso2.org/cgi-bin/mailman/listinfo/dev