Releases: uploadcare/uploadcare-js-api-clients
Releases · uploadcare/uploadcare-js-api-clients
v2.0.0
2.0.0 (2021-11-15)
Features
- feat!: add cjs and esm support (#283) (081f27e), closes #283
- feat!: replace CancelController with native AbortController (#282) (020e1ae), closes #282
- add mimeType to UploadcareFile type (33b6c58)
- export high-level upload methods (1354018)
- handle server error codes (948c9d1)
- add option
userAgent
to pass custom user agent string or function (d74fefb)
BREAKING CHANGES
- remove default export because webpack can't handle it without bugs
- replace
cancel
key withsignal
in all cancelable methods - property
response
ofUploadClientError
now contains the whole response object ({ error: {...}}
)
v1.1.5
v1.1.4
v1.1.3
v1.1.2
1.1.2 (2020-04-20)
Bug Fixes
- multipart: implement retry for part uploading (#253) (e2330bb)
- multipart: add is ready pool for mulipart upload (#254) (fe7ca2a)
- multipart: implement multipart progress for node (#252) (b60eb83)
- multipart: use browser contentType if option is not passed (#251) (f5ab80a)
- multipart: use browser filename if option is not passed (#250) (749e4a9)
v1.1.1
v1.1.0
v1.0.1
v1.0.0
1.0.0 (2019-12-23)
Changed
- All methods return a
Promise
now instead ofThenableInterface
SettingsInterface
was renamed toSettings
fileFrom
was renamed touploadFile
.groupFrom
was renamed touploadFileGroup
.request
low-level API method is not exported outside now.- Method
setSettings
ofUploadClient
was renamed toupdateSettings
. - Methods (
base
,fromUrl
,fromUrlStatus
,group
,
groupInfo
,info
,multipartStart
,multipartUpload
,
multipartComplete
,multipart
,uploadFile
,uploadGroup
) were exported
fromindex.ts
to make the tree shaking better. - Methods (
base
,fromUrl
,fromUrlStatus
,group
,
groupInfo
,info
,multipartStart
,multipartUpload
,
multipartComplete
,multipart
,uploadFile
,uploadGroup
) accept
options
instead ofsettings
as a second argument. UploadClient
now contains all low-level API methods (base
,
fromUrl
,fromUrlStatus
,group
,groupInfo
,info
,
multipartStart
,multipartUpload
,multipartComplete
,multipart
,
fileFrom
,groupFrom
).UploadcareGroup
files now containUploadcareFile[]
, but notFileInfo[]
.README.md
was updated according to library API.FileData
becameNodeFile
andBrowserFile
.
Removed
UploadAPI
class.Thenable
,CancelableThenable
,BaseThenable
,Upload
classes
implementing respective interfaces.onReady
,onUploaded
callbacks.addUpdateSettingsListener
andremoveUpdateSettingsListener
from
UploadClientInterface
.from
param ofuploadFile
anduploadFileGroup
.FileFromEnum
andGroupFromEnum
.
Added
CancelController
to make API calls cancellable. See README for how
to use this feature. (#77)
v1.0.0-alpha.5
Added
- Support of multipart and uploading of big files:
multipartStart
,
multipartUpload
andmultipartComplete
methods toUploadAPI
. - Support of cancel and handling canceling uploads for all api methods
(info
,fromUrl
,fromUrlStatus
,group
,groupInfo
). DefaultSettingsInterface
with required properties.pollingTimeoutMilliseconds
toSettingsInterface
.
Now you can adjust the timeout for checking file is ready
and checking file is uploaded from url.maxConcurrentRequests
setting that allows you to specify the number
of concurrent requests.
Changed
FileFrom
enum was renamed toFileFromEnum
.GroupFrom
enum was renamed toGroupFromEnum
.Settings
was renamed toSettingsInterface
.FileInfo
was renamed toFileInfoInterface
.GroupInfo
was renamed toGroupInfoInfoInterface
.OriginalImageInfo
was renamed toOriginalImageInfoInterface
.RequestOptions
was renamed toRequestOptionsInterface
.ProgressStatus
was renamed toProgressStatusInterface
.Audio
type was renamed toAudioInterface
.Video
type was renamed toVideoInterface
.ErrorRequestInfo
type was renamed toErrorRequestInfoInterface
.ErrorResponseInfoInfo
type was renamed toErrorResponseInfoInterface
.ProgressState
was renamed toProgressStateEnum
.ProgressParams
was renamed toProgressParamsInterface
.base
method of Upload API now returnsBaseThenableInterface<BaseResponse>
instead ofDirectUploadInterface
.info
,fromUrl
,fromUrlStatus
,group
,groupInfo
now returns
CancelableThenableInterface
.- Progress is now calculated from 0 to 1 instead of 0 to 100
Fixed
- Example with
directUpload.onProgress
inREADME.md
. - All tests now passed.
- Mock server tests are now passed.
Removed
DirectUploadInterface
was removed in favor ofBaseThenableInterface<BaseResponse>
.BaseProgress
was removed in favor of nativeProgressEvent
.InfoResponse
was removed in favor ofFileInfoInterface
.- Old code in folder
./.back
.