uploadData => uploadRawData
authordeepak1556 <hop2deep@gmail.com>
Mon, 24 Oct 2016 10:25:06 +0000 (15:55 +0530)
committerKevin Sawicki <kevinsawicki@gmail.com>
Fri, 11 Nov 2016 18:54:01 +0000 (10:54 -0800)
atom/common/native_mate_converters/content_converter.cc
docs/api/browser-window.md
docs/api/structures/upload-raw-data.md [new file with mode: 0644]
docs/api/web-contents.md
docs/api/web-view-tag.md
spec/api-browser-window-spec.js

index 0b07b6d..72f1011 100644 (file)
@@ -215,7 +215,7 @@ Converter<scoped_refptr<ResourceRequestBodyImpl>>::ToV8(
       std::unique_ptr<base::Value> bytes(
           base::BinaryValue::CreateWithCopiedBuffer(
               element.bytes(), static_cast<size_t>(element.length())));
-      post_data_dict->SetString("type", "data");
+      post_data_dict->SetString("type", "rawData");
       post_data_dict->Set("bytes", std::move(bytes));
     } else if (type == ResourceRequestBodyImpl::Element::TYPE_FILE) {
       post_data_dict->SetString("type", "file");
@@ -257,7 +257,7 @@ bool Converter<scoped_refptr<ResourceRequestBodyImpl>>::FromV8(
     if (!list->GetDictionary(i, &dict))
       return false;
     dict->GetString("type", &type);
-    if (type == "data") {
+    if (type == "rawData") {
       base::BinaryValue* bytes = nullptr;
       dict->GetBinary("bytes", &bytes);
       (*out)->AppendBytes(bytes->GetBuffer(), bytes->GetSize());
index 05fbf1b..304c24c 100644 (file)
@@ -969,7 +969,7 @@ Same as `webContents.capturePage([rect, ]callback)`.
   * `httpReferrer` String - A HTTP Referrer url.
   * `userAgent` String - A user agent originating the request.
   * `extraHeaders` String - Extra headers separated by "\n"
-  * `postData` ([UploadData](structures/upload-data.md) | [UploadFile](structures/upload-file.md) | [UploadFileSystem](structures/upload-file-system.md) | [UploadBlob](structures/upload-blob.md))[]
+  * `postData` ([UploadRawData](structures/upload-raw-data.md) | [UploadFile](structures/upload-file.md) | [UploadFileSystem](structures/upload-file-system.md) | [UploadBlob](structures/upload-blob.md))[]
 
 Same as `webContents.loadURL(url[, options])`.
 
diff --git a/docs/api/structures/upload-raw-data.md b/docs/api/structures/upload-raw-data.md
new file mode 100644 (file)
index 0000000..5632d8e
--- /dev/null
@@ -0,0 +1,4 @@
+# Upload RawData Object
+
+* `type` String - `rawData`.
+* `bytes` Buffer - Data to be uploaded.
index fc3fec3..638851d 100644 (file)
@@ -490,7 +490,7 @@ win.loadURL('http://github.com')
   * `httpReferrer` String - A HTTP Referrer url.
   * `userAgent` String - A user agent originating the request.
   * `extraHeaders` String - Extra headers separated by "\n"
-  * `postData` ([UploadData](structures/upload-data.md) | [UploadFile](structures/upload-file.md) | [UploadFileSystem](structures/upload-file-system.md) | [UploadBlob](structures/upload-blob.md))[]
+  * `postData` ([UploadRawData](structures/upload-raw-data.md) | [UploadFile](structures/upload-file.md) | [UploadFileSystem](structures/upload-file-system.md) | [UploadBlob](structures/upload-blob.md))[]
 
 Loads the `url` in the window. The `url` must contain the protocol prefix,
 e.g. the `http://` or `file://`. If the load should bypass http cache then
index 592eb59..884e4f3 100644 (file)
@@ -265,7 +265,7 @@ webview.addEventListener('dom-ready', () => {
   * `httpReferrer` String - A HTTP Referrer url.
   * `userAgent` String - A user agent originating the request.
   * `extraHeaders` String - Extra headers separated by "\n"
-  * `postData` ([UploadData](structures/upload-data.md) | [UploadFile](structures/upload-file.md) | [UploadFileSystem](structures/upload-file-system.md) | [UploadBlob](structures/upload-blob.md))[]
+  * `postData` ([UploadRawData](structures/upload-raw-data.md) | [UploadFile](structures/upload-file.md) | [UploadFileSystem](structures/upload-file-system.md) | [UploadBlob](structures/upload-blob.md))[]
 
 Loads the `url` in the webview, the `url` must contain the protocol prefix,
 e.g. the `http://` or `file://`.
index f4bb529..e8a12aa 100644 (file)
@@ -29,7 +29,7 @@ describe('browser-window module', function () {
     const fileStats = fs.statSync(filePath)
     postData = [
       {
-        'type': 'data',
+        'type': 'rawData',
         'bytes': new Buffer('username=test&file=')
       },
       {