Skip to content

Commit 410667d

Browse files
authored
Bugfix/ii chunk size (#444)
* chore(release): 3.23.2 * fix(intelligent_ingestion): fix problems with odd chunk size
1 parent 27774da commit 410667d

File tree

4 files changed

+22
-95
lines changed

4 files changed

+22
-95
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,15 @@
22

33
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
44

5+
### [3.23.2](https://github.com/filestack/filestack-js/compare/v3.23.1...v3.23.2) (2021-06-14)
6+
7+
8+
### Bug Fixes
9+
10+
* **examples:** fix uplad example ([160a1bd](https://github.com/filestack/filestack-js/commit/160a1bdc96ed298408048e8d9201c00c18eec1c6))
11+
* **picker:** fix problems with exif cleanup ([27774da](https://github.com/filestack/filestack-js/commit/27774da20dc2e523bdcff59cc67c976d3445a7ca))
12+
* **upload/onprogress:** add if statement for progress callback ([#435](https://github.com/filestack/filestack-js/issues/435)) ([2c61d53](https://github.com/filestack/filestack-js/commit/2c61d53a655e0eeb85dd430fc403147654ea370c))
13+
514
### [3.23.1](https://github.com/filestack/filestack-js/compare/v3.23.0...v3.23.1) (2021-03-31)
615

716

package-lock.json

Lines changed: 5 additions & 86 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "filestack-js",
3-
"version": "3.23.1",
3+
"version": "3.23.2",
44
"description": "Official JavaScript library for Filestack",
55
"main": "build/main/index.js",
66
"module": "build/module/index.js",

src/lib/api/upload/uploaders/s3.ts

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,16 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
18-
import PQueue from 'p-queue';
1917
import Debug from 'debug';
18+
import PQueue from 'p-queue';
2019

21-
import { File, FilePart, FilePartMetadata, FileState } from './../file';
22-
import { StoreUploadOptions } from './../types';
23-
import { FsRequest, FsResponse, FsRequestError, FsCancelToken } from './../../../request';
24-
import { uniqueTime, uniqueId, filterObject } from './../../../utils';
25-
import { UploaderAbstract, UploadMode, INTELLIGENT_CHUNK_SIZE, MIN_CHUNK_SIZE, DEFAULT_STORE_LOCATION } from './abstract';
2620
import { FilestackError, FilestackErrorType } from './../../../../filestack_error';
21+
import { FsCancelToken, FsRequest, FsRequestError, FsResponse } from './../../../request';
2722
import { shouldRetry } from './../../../request/helpers';
23+
import { filterObject, uniqueId, uniqueTime } from './../../../utils';
24+
import { File, FilePart, FilePartMetadata, FileState } from './../file';
25+
import { StoreUploadOptions } from './../types';
26+
import { DEFAULT_STORE_LOCATION, INTELLIGENT_CHUNK_SIZE, MIN_CHUNK_SIZE, UploaderAbstract, UploadMode } from './abstract';
2827

2928
const debug = Debug('fs:upload:s3');
3029

@@ -601,7 +600,7 @@ export class S3Uploader extends UploaderAbstract {
601600

602601
// reset progress on failed upload
603602
this.onProgressUpdate(id, partNumber, part.offset);
604-
const nextChunkSize = chunkSize / 2;
603+
const nextChunkSize = Math.ceil(chunkSize / 2);
605604

606605
if (nextChunkSize < MIN_CHUNK_SIZE) {
607606
debug(`[${id}] Minimal chunk size limit. Upload file failed!`);

0 commit comments

Comments
 (0)