SAPUI5 upload file and use it as model -
i upload xml file local workspace , use model. can upload files server don't know how retrieve data uploaded object , set or load model
here how m uploading file.
jquery.ajax({ url: ofileuploader.getuploadurl(), headers: oheaders, type: 'put', cache: false, contenttype: false, processdata: false, data: file }); }
i not use standard ofileuploader.upload() because uses http method "post" , wanted "put"
thank you
it not clear how contents of file
variable passing jquery.ajax call. depending on this, have 3 options hat come mind:
- directly use
file
variable contents in model. - use filereader api read file contents , put them in model.
- make back-end service return xml content of file response ajax call , store response in model.
Comments
Post a Comment