Reputation: 110
I would like to upload a xml file from the local workspace and use it as model. I can upload files to the server but i don't know how to retrieve the data from the uploaded object and set or load it to my model
Here is how I m uploading the file.
jQuery.ajax({
url: oFileUploader.getUploadUrl(),
headers: oHeaders,
type: 'PUT',
cache: false,
contentType: false,
processData: false,
data: file
});
}
I could not use the standard oFileUploader.upload() because it uses the http method "POST" and I wanted to do a "PUT"
Thank you
Upvotes: 0
Views: 966
Reputation: 5206
It is not clear how you get the contents of the file
variable that you are passing to the jQuery.ajax call. Depending on this, you have three options hat come to mind:
file
variable contents in a model.Upvotes: 1