Add support for uploading binary content through the edit rest api
Adding UI support will be done in a followup.
Change-Id: I3db1bc0503d83e58fadcc9642224fb8cec74ce92
diff --git a/Documentation/rest-api-changes.txt b/Documentation/rest-api-changes.txt
index f7019d6..677c246 100644
--- a/Documentation/rest-api-changes.txt
+++ b/Documentation/rest-api-changes.txt
@@ -2728,6 +2728,20 @@
PUT /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit/foo HTTP/1.0
----
+To upload a file as binary data in the request body:
+
+.Request
+----
+ PUT /changes/myProject~master~I8473b95934b5732ac55d26311a706c9c2bde9940/edit/foo HTTP/1.0
+ Content-Type: application/json; charset=UTF-8
+
+ {
+ "binary_content": "data:text/plain;base64,SGVsbG8sIFdvcmxkIQ=="
+ }
+----
+
+Note that it must be base-64 encoded data uri.
+
When change edit doesn't exist for this change yet it is created. When file
content isn't provided, it is wiped out for that file. As response
"`204 No Content`" is returned.