@uploadcare/upload-client 3.1.0 → 4.0.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 +5 -3
- package/dist/index.browser.js +1441 -1451
- package/dist/{index.js → index.node.js} +1468 -1463
- package/dist/index.react-native.js +1546 -0
- package/dist/types.d.ts +47 -37
- package/package.json +30 -37
- package/dist/index.browser.cjs +0 -1743
- package/dist/index.cjs +0 -1775
package/README.md
CHANGED
|
@@ -173,7 +173,7 @@ You can import only needed methods directly, without `UploadClient` wrapper:
|
|
|
173
173
|
import {
|
|
174
174
|
uploadFile,
|
|
175
175
|
uploadFromUrl,
|
|
176
|
-
|
|
176
|
+
uploadDirect,
|
|
177
177
|
uploadFromUploaded,
|
|
178
178
|
uploadMultipart,
|
|
179
179
|
uploadFileGroup
|
|
@@ -185,7 +185,7 @@ import {
|
|
|
185
185
|
Also, you can use low-level wrappers to call the API endpoints directly:
|
|
186
186
|
|
|
187
187
|
```javascript
|
|
188
|
-
import { base
|
|
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()
|
|
@@ -403,12 +403,13 @@ Defaults to `application/octet-stream`.
|
|
|
403
403
|
type Metadata = {
|
|
404
404
|
[key: string]: string
|
|
405
405
|
}
|
|
406
|
+
```
|
|
406
407
|
|
|
407
408
|
Metadata is additional, arbitrary data, associated with uploaded file.
|
|
408
409
|
|
|
409
410
|
Non-string values will be converted to `string`. `undefined` values will be ignored.
|
|
410
411
|
|
|
411
|
-
See [
|
|
412
|
+
See [REST API reference][uc-docs-metadata] for details.
|
|
412
413
|
|
|
413
414
|
|
|
414
415
|
## Testing
|
|
@@ -472,3 +473,4 @@ request at [hello@uploadcare.com][uc-email-hello].
|
|
|
472
473
|
[badge-build]: https://github.com/uploadcare/uploadcare-upload-client/actions/workflows/checks.yml/badge.svg
|
|
473
474
|
[build-url]: https://github.com/uploadcare/uploadcare-upload-client/actions/workflows/checks.yml
|
|
474
475
|
[uc-docs-upload-api]: https://uploadcare.com/docs/api_reference/upload/?utm_source=github&utm_campaign=uploadcare-upload-client
|
|
476
|
+
[uc-docs-metadata]: https://uploadcare.com/api-refs/rest-api/v0.7.0/#tag/File-Metadata
|