Merge pull request #6941 from deepak1556/blob_data_patch
protocol: provide blob uuid with uploadData
This commit is contained in:
commit
9714348260
11 changed files with 321 additions and 0 deletions
|
@ -93,6 +93,8 @@ The `uploadData` is an array of `data` objects:
|
|||
* `data` Object
|
||||
* `bytes` Buffer - Content being sent.
|
||||
* `file` String - Path of file being uploaded.
|
||||
* `blobUUID` String - UUID of blob data. Use [ses.getBlobData](session.md#sesgetblobdataidentifier-callback) method
|
||||
to retrieve the data.
|
||||
|
||||
To handle the `request`, the `callback` should be called with either the file's
|
||||
path or an object that has a `path` property, e.g. `callback(filePath)` or
|
||||
|
|
|
@ -326,6 +326,14 @@ This doesn't affect existing `WebContents`, and each `WebContents` can use
|
|||
|
||||
Returns a `String` representing the user agent for this session.
|
||||
|
||||
#### `ses.getBlobData(identifier, callback)`
|
||||
|
||||
* `identifier` String - Valid UUID.
|
||||
* `callback` Function
|
||||
* `result` Buffer - Blob data.
|
||||
|
||||
Returns the blob data associated with the `identifier`.
|
||||
|
||||
### Instance Properties
|
||||
|
||||
The following properties are available on instances of `Session`:
|
||||
|
@ -513,6 +521,8 @@ The `uploadData` is an array of `data` objects:
|
|||
* `data` Object
|
||||
* `bytes` Buffer - Content being sent.
|
||||
* `file` String - Path of file being uploaded.
|
||||
* `blobUUID` String - UUID of blob data. Use [ses.getBlobData](session.md#sesgetblobdataidentifier-callback) method
|
||||
to retrieve the data.
|
||||
|
||||
The `callback` has to be called with an `response` object:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue