I have a simple ExtJs form panel in which the file is uploaded field. When I submit the form to the server, all the major value form Values are sent to the server, but the key values do not pair for the file upload area. Does anyone know why this is? (I have attached a few code snippets below)
In addition to how can I manage uploading on the server. That is, I would like to upload an image to the server and save it from anywhere on the server?
Public JSOUSsetTemplate Experiment Details (string first name, string photopath) {GetData Data = Representative {Return Repo. (First name, photopath); }; Jenson resultbusjesurzult = getageanrilt (data); Jenson Result Jason = Portal Jackson Result (Jessenley Rezultate, Jason Yunus Behavior Alove Gate); Return json; }}}} {Item: 'firstname', xtype: 'textfield', name: 'firstname', maximum length: 10, permission box: wrong}, {xtype} : 'Fileuploadfield', id: 'form-file', empty text: 'select an image', field label: 'photo', name: 'photopath', button text: '', buttonfig: {iconCls: 'upload-icon '}}], Button: [{Text:' save ', scope: this, handler: function () {var form = this.items.items [0] .getForm (); If (form.isValid ()) {form.submit ({url: 'Employee Details / Set Emporiyab Details', Wait Message: 'Saving Your Details ...', Success: Function (FP, O) {msg ('Successful', 'file on processed server');}}); }}}}
You can not retrieve file method parameters. Therefore, your PhotoPath variable will usually be zero. To access the uploaded file, you can:
HttpPostedFileBase postedFile = Request.Files ["fileinput"]; If the file content is processed by using (postfile! = Null) {// Postfile.InputStream ...} and you need to upload the file in Javascript: Correct, in your form config so that Extras knows that you are uploading the file to the form.
Comments
Post a Comment