Skip to content

Commit

Permalink
Merge pull request #220 from bennigraf/patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
perry-mitchell authored Oct 12, 2020
2 parents 2416073 + 10a52a7 commit 855a08a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ const NOOP = () => {};
* Options for creating a resource
* @typedef {UserOptions} PutOptions
* @property {Boolean=} overwrite - Whether or not to overwrite existing files (default: true)
* @property {Number=} maxContentLength - The maximum amount of bytes to upload (default: 10 MiB)
* @property {Number=} maxContentLength - The maximum amount of bytes to download (default: 10 MiB)
* @property {Number=} maxBodyLength - The maximum amount of bytes to upload (default: 10 MiB) (only in nodejs-environments)
*/

/**
Expand Down
3 changes: 3 additions & 0 deletions source/request.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,9 @@ function prepareRequestOptions(requestOptions, methodOptions) {
if (methodOptions.maxContentLength) {
requestOptions.maxContentLength = methodOptions.maxContentLength;
}
if (methodOptions.maxBodyLength) {
requestOptions.maxBodyLength = methodOptions.maxBodyLength;
}
if (methodOptions.onUploadProgress && typeof methodOptions.onUploadProgress === "function") {
requestOptions.onUploadProgress = methodOptions.onUploadProgress;
}
Expand Down

0 comments on commit 855a08a

Please sign in to comment.