Skip to Content

Unable to set UploadUrl of uploadcollection in code

The setUploadUrl method does not work, when I used it I found that the url is still a default one i.e " ../../../upload", then I tried to build a model on the controller with a url and pass it to the uploadCollection in this way:

On the view I bound the uploadUrl property to the model:


On the controller I instatiated a model and set it to the uploadCollection, I have tried setting the model inside the onChange event of the uploadCollection and also outside it, even though the uploadCollection got the model the url still was the default one:

var oData = {

uploadURL: {

path: "my Server Url/my service/Applications('" +parameter1 + "','" + parameter2 + "')/App_Attachments"



var oModel1 = new JSONModel(oData);

var oUploadCollection = this.getView().byId("UploadCollection");


Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Aug 30, 2016 at 02:18 PM

    I found the solution to this problem. I used setProperty in the ff way:

    var url = "my Server Url/my service/Applications('" +parameter1 + "','" + parameter2 + "')/App_Attachments";

    oUploadCollection.setProperty("uploadUrl", url);

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.