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:

  1. directly use file variable contents in model.
  2. use filereader api read file contents , put them in model.
  3. make back-end service return xml content of file response ajax call , store response in model.

Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -