Please give an example of how to upload content of a document attribute of entity in _initialData.
It would also be good to have an example of what call of “setDocument” shall look like in UB-UB client.
UPD: I figured it out, but I think we god some room for improvement here.
First of all, we DO need better documentation on “setDocument” app-level method. I also think we desperately need to master art of working with documents:
- conception of temp store
- when to set content of temp store
- who and when cleans it up
- work with documents on server, example
- work with documents on client, web client and ub client, example
Next, we have a bug in UBConnection.runCustom - the aURLParams are not passed down to the
xhr method, which is crucial for call
setDocument endpoint name.
As a workaround, I used the
xhr method directly, but it would be good to fix the
Another question - whether
setDocument call deservce it’s own method in UBConnection?