@uploadcare/upload-client 3.1.2-alpha.0 → 4.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -101,7 +101,7 @@ const fileUUID = 'edfdf045-34c0-4087-bbdd-e3834921f890'
101
101
  const abortController = new AbortController()
102
102
 
103
103
  client
104
- .uploadFile(fileUUID, { signal: abortController })
104
+ .uploadFile(fileUUID, { signal: abortController.signal })
105
105
  .then(file => console.log(file.uuid))
106
106
  .catch(error => {
107
107
  if (error.isCancel) {
@@ -173,7 +173,7 @@ You can import only needed methods directly, without `UploadClient` wrapper:
173
173
  import {
174
174
  uploadFile,
175
175
  uploadFromUrl,
176
- uploadBase,
176
+ uploadDirect,
177
177
  uploadFromUploaded,
178
178
  uploadMultipart,
179
179
  uploadFileGroup
@@ -185,12 +185,12 @@ import {
185
185
  Also, you can use low-level wrappers to call the API endpoints directly:
186
186
 
187
187
  ```javascript
188
- import { base, AbortController } from '@uploadcare/upload-client'
188
+ import { base } from '@uploadcare/upload-client'
189
189
 
190
190
  const onProgress = ({ isComputable, value }) => console.log(isComputable, value)
191
191
  const abortController = new AbortController()
192
192
 
193
- base(fileData, { onProgress, signal: abortController }) // fileData must be `Blob` or `File` or `Buffer`
193
+ base(fileData, { onProgress, signal: abortController.signal }) // fileData must be `Blob` or `File` or `Buffer`
194
194
  .then(data => console.log(data.file))
195
195
  .catch(error => {
196
196
  if (error.isCancel) {