customizing kanban with ajax

Hello, webix team
(1) How to use webix.ajax().post with my parameter to upload attachment, if I don’t use the customized editor? Because the default attachment property cannot add my parameter.

(2) To avoid calling twice api, I use the following function. When I set the statement to reject the promise, it cannot call the api with move task action in the same status. So, it is not suitable for moving the task and content editing. How to solve the problem?

               if(update["webix_move_parent"]) { // avoid calling twice api
                    return webix.promise.defer().reject();
                } else {
                    return webix.ajax().post("/SaveTasks",
                        update,
                        function(response) {
                        }
                    );
                }

(3) How to set the config(color/user/tag) before the kanban rendering?
https://snippet.webix.com/2jcqxm4f

Thank you.

Hey @Karena, regarding your points:

  1. You can use formData from the standart uploader API to send additional parameters.
  2. You can achieve this by using Data Collections and passing the required parameters inside the url property.

Please refer to the following example where you can see how it can be implemented: https://snippet.webix.com/m88ssv6m

@Dzmitry Thank for your reply.
Regarding my question no.2, can you help me to avoid calling twice api when I update the task? And the solution need to meet requirement that can call once api when I update task’s order in the same state or change the task’s state.

@Dzmitry Hello, I would like to access and save the order of tasks. The $index attribute cannot be accessed from the update parameter in save property.

     save: function(id, operation, update)

How can I achieve it in the save property?
https://snippet.webix.com/nyqdv3gm
By the way, the question 2 has already resolved with onAfterDrop method.
Looking forward to your reply. Thanks!