Skip to content

Commit 7066521

Browse files
author
Ilya Lebedev
committed
more info on response codes and headers
1 parent a671a8a commit 7066521

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -485,9 +485,16 @@ Client explicitly sets the following headers:
485485
Any other headers are set by a target browser and are not used by client.
486486
Library does not provide any facilities to track a file uniqueness across requests, it's left on developer's consideration.
487487

488-
Client recognizes the following response codes:
489-
* 200, 201 - chunk is successfully saved
490-
* 416, 500 - recoverable error, library tries to resend chunk 'chunkUploadRetry' times then fails
488+
Response codes:
489+
* 200 - last chunk is uploaded
490+
* 201 - chunk is successfully saved
491+
* 416 - range is not acceptable error, recoverable
492+
* 500 - server error, recoverable
493+
494+
For recoverable errors server tries to resend chunk 'chunkUploadRetry' times then fails.
495+
496+
Response headers:
497+
* X-Last-Known-Byte: int, library tries to resend chunk from the given offset. Applicable to response codes 200 and 416
491498

492499
All the other codes - fatal error, user's involvement is recommend.
493500

0 commit comments

Comments
 (0)