Skip to content

Commit cf12a69

Browse files
committed
Merge branch 'develop' of github.com:filestack/filestack-js into develop
2 parents 9fa75fc + 5da1be2 commit cf12a69

File tree

3 files changed

+14
-93
lines changed

3 files changed

+14
-93
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@
6464
npm install filestack-js
6565
```
6666

67+
To get your free API key, sign up for a Filestack account here:
68+
[https://dev.filestack.com/signup/free](https://dev.filestack.com/signup/free).
69+
6770
## API Documentation
6871

6972
[https://filestack.github.io/filestack-js/](https://filestack.github.io/filestack-js/)

package-lock.json

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

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)