How to send files to Drupal 8 via REST I can create articles via REST without problems. But I can not figure out how to submit files. 

How do I submit files (images) to Drupal 8 via REST?

Update:

REST UI - File: /file/{id}

Example image added in article: 
/admin/content/files -&gt; /admin/content/files/usage/1

file {id} = 1?

Get file id 1:

curl --request GET --user admin:admin --header 'Accept: application/hal+json' http://d8.local/file/1
A fatal error occurred: No route found for "GET /file/1"


Post image (without entity content):

curl --request POST --user admin:admin --header 'Content-type: application/hal+json' http://d8.local/entity/file
{"error":"No entity content received."}


I can't find out how to create the entity content.
Apply patch to the core: https://www.drupal.org/node/1927648
Install Rest UI using: drush dl restui-8.x-1.x
Go to /admin/config/services/rest and activate File /entity/file/{file}
Under /admin/people/permissions set all necessary permissions
Make sure files folder exists and has proper permissions
Encode image using command tool base64
POST to drupal.url/entity/file/

{"_links":
{
  "type":{"href":"http://drupal.url/rest/type/file/file"}
},
  "filename":[{"value":"input.jpg"}],
  "filemime":[{"value":"image/jpeg"}],
  "data":[{"value":"insert-output-from-base64-here"}] }