How do I attach files to nodes?
For my first question:
I'm sending data with this format and it works now

{
  "field_files":[

    { 
      "fid": "445"
    },

    {
      "fid":"446"
    }
  ]
}


Where fid is the id of an existing and accessible file.

For my second question, I've written module extending restws classes that user can submit data like the way user submits for services rest api.

Idea behind my module is that user submits data and module checks validation data and if data is valid saves file using drupal file_save_data function.