From dbe57c4ad46068046f3a3e4b69cc5a33709ef3f9 Mon Sep 17 00:00:00 2001 From: deepak1556 Date: Wed, 12 Oct 2016 23:35:35 +0530 Subject: [PATCH] update docs --- docs/api/browser-window.md | 30 +++-------------------- docs/api/structures/upload-blob.md | 4 +++ docs/api/structures/upload-file-system.md | 9 +++++++ docs/api/structures/upload-file.md | 9 +++++++ docs/api/web-contents.md | 24 +----------------- docs/api/web-view-tag.md | 24 +----------------- 6 files changed, 28 insertions(+), 72 deletions(-) create mode 100644 docs/api/structures/upload-blob.md create mode 100644 docs/api/structures/upload-file-system.md create mode 100644 docs/api/structures/upload-file.md diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index a8d43cd293c9..05fbf1bff26a 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -966,32 +966,10 @@ Same as `webContents.capturePage([rect, ]callback)`. * `url` String * `options` Object (optional) - * `httpReferrer` String (optional) - A HTTP Referrer url. - * `userAgent` String (optional) - A user agent originating the request. - * `extraHeaders` String (optional) - Extra headers separated by "\n" - * `postData` Array (optional) - An array of `upload` objects which - provides the request body for `POST` navigation. - -* `upload` Object - * `type` String - `data`, `file`, `filsSystem`, `blob`. - -If `type` is `data` then `upload` object must contain: - * `bytes` Buffer - Raw data to be uploaded. - -If `type` is `file` then `upload` object must contain: - * `filePath` String - Path of file to be uploaded. - * `offset` Integer - * `length` Integer - * `modificationTime` Double - -If `type` is `fileSystem` then `upload` object must contain: - * `filsSystemURL` String - FileSystem url to read data for upload. - * `offset` Integer - * `length` Integer - * `modificationTime` Double - -If `type` is `blob` then `upload` object must contain: - * `blobUUID` String - UUID of blob data to upload. + * `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))[] Same as `webContents.loadURL(url[, options])`. diff --git a/docs/api/structures/upload-blob.md b/docs/api/structures/upload-blob.md new file mode 100644 index 000000000000..5cd6c15ef5c0 --- /dev/null +++ b/docs/api/structures/upload-blob.md @@ -0,0 +1,4 @@ +# Upload blob Object + +* `type` String - `blob`. +* `blobUUID` String - UUID of blob data to upload. diff --git a/docs/api/structures/upload-file-system.md b/docs/api/structures/upload-file-system.md new file mode 100644 index 000000000000..1e59ade61770 --- /dev/null +++ b/docs/api/structures/upload-file-system.md @@ -0,0 +1,9 @@ +# Upload fileSystem Object + +* `type` String - `fileSystem`. +* `filsSystemURL` String - FileSystem url to read data for upload. +* `offset` Integer - Defaults to `0`. +* `length` Integer - Number of bytes to read from `offset`. + Defaults to `0`. +* `modificationTime` Double - Last Modification time in + number of seconds sine the UNIX epoch. diff --git a/docs/api/structures/upload-file.md b/docs/api/structures/upload-file.md new file mode 100644 index 000000000000..5f5ea67dd108 --- /dev/null +++ b/docs/api/structures/upload-file.md @@ -0,0 +1,9 @@ +# Upload file Object + +* `type` String - `file`. +* `filePath` String - Path of file to be uploaded. +* `offset` Integer - Defaults to `0`. +* `length` Integer - Number of bytes to read from `offset`. + Defaults to `0`. +* `modificationTime` Double - Last Modification time in + number of seconds sine the UNIX epoch. diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index d122587cc630..fc3fec3baf7e 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -490,29 +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` Array - An array of `upload` objects which - provides the request body for `POST` navigation. - -* `upload` Object - * `type` String - `data`, `file`, `filsSystem`, `blob`. - -If `type` is `data` then `upload` object must contain: - * `bytes` Buffer - Raw data to be uploaded. - -If `type` is `file` then `upload` object must contain: - * `filePath` String - Path of file to be uploaded. - * `offset` Integer - * `length` Integer - * `modificationTime` Double - -If `type` is `fileSystem` then `upload` object must contain: - * `filsSystemURL` String - FileSystem url to read data for upload. - * `offset` Integer - * `length` Integer - * `modificationTime` Double - -If `type` is `blob` then `upload` object must contain: - * `blobUUID` String - UUID of blob data to upload. + * `postData` ([UploadData](structures/upload-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 diff --git a/docs/api/web-view-tag.md b/docs/api/web-view-tag.md index f9e47f0c3835..592eb5907ee4 100644 --- a/docs/api/web-view-tag.md +++ b/docs/api/web-view-tag.md @@ -265,29 +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` Array - An array of `upload` objects which - provides the request body for `POST` navigation. - -* `upload` Object - * `type` String - `data`, `file`, `filsSystem`, `blob`. - -If `type` is `data` then `upload` object must contain: - * `bytes` Buffer - Raw data to be uploaded. - -If `type` is `file` then `upload` object must contain: - * `filePath` String - Path of file to be uploaded. - * `offset` Integer - * `length` Integer - * `modificationTime` Double - -If `type` is `fileSystem` then `upload` object must contain: - * `filsSystemURL` String - FileSystem url to read data for upload. - * `offset` Integer - * `length` Integer - * `modificationTime` Double - -If `type` is `blob` then `upload` object must contain: - * `blobUUID` String - UUID of blob data to upload. + * `postData` ([UploadData](structures/upload-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://`.