@bytescale/sdk
Advanced tools
Comparing version 3.0.0-alpha.10 to 3.0.0-alpha.11
@@ -14,2 +14,3 @@ import { BytescaleApiClientConfig, FileDetails, UploadPart } from "../public/shared/generated"; | ||
protected readonly stringMimeType = "text/plain"; | ||
private readonly accountId; | ||
private readonly defaultMaxConcurrentUploadParts; | ||
@@ -16,0 +17,0 @@ private readonly intervalMs; |
@@ -23,3 +23,2 @@ /// <reference types="node" /> | ||
export interface UploadManagerParams extends Omit<BeginMultipartUploadRequest, "size" | "protocol"> { | ||
accountId: string; | ||
cancellationToken?: CancellationToken; | ||
@@ -26,0 +25,0 @@ data: UploadSource; |
{ | ||
"name": "@bytescale/sdk", | ||
"version": "3.0.0-alpha.10", | ||
"version": "3.0.0-alpha.11", | ||
"description": "Bytescale JavaScript SDK", | ||
@@ -5,0 +5,0 @@ "author": "Bytescale <hello@bytescale.com> (https://www.bytescale.com)", |
@@ -85,3 +85,3 @@ <h1 align="center"> | ||
fetchApi: fetch, // or 'fetch as any' (please note: you must use 'node-fetch' as errors can occur with other implementations) | ||
apiKey: "YOUR_API_KEY" // e.g. "public_xxxxx" | ||
apiKey: "free" // Get API keys from: www.bytescale.com | ||
}); | ||
@@ -95,5 +95,2 @@ | ||
// Your account ID (e.g. "W142hJk") | ||
accountId: "YOUR_ACCOUNT_ID", | ||
// Supported types for 'data' field: | ||
@@ -381,3 +378,3 @@ // - String | ||
With JWT cookies, the user can download private files directly via URL, as authorization is performed implicitly via a session cookie. This allows the browser to display private files in `<img>` and `<video>` elements. | ||
With JWT cookies, the user can download private files directly via the URL, as authorization is performed implicitly via a session cookie. This allows the browser to display private files in `<img>` and `<video>` elements. | ||
@@ -388,3 +385,3 @@ With JWT cookies, the user can also perform API requests (e.g. file uploads) granted by the [JWT's payload](https://www.bytescale.com/docs/types/BytescaleJwt). This is because the Bytescale JavaScript SDK automatically injects the user's JWT into the `authorization-token` request header for all API requests, assuming the `AuthManager.beginAuthSession` method has been called. | ||
[Learn more about using JWT cookies »](https://www.bytescale.com/docs/authorization#jwt-cookie) | ||
[Learn more about the `AuthManager` and JWT cookies »](https://www.bytescale.com/docs/authorization#jwt-cookie) | ||
@@ -391,0 +388,0 @@ ## UrlBuilder |
@@ -30,3 +30,2 @@ import { BytescaleApiClientConfig, FileApi, UploadManager } from "../src/index.node"; | ||
const uploadedFile = await uploadManager.upload({ | ||
accountId, | ||
data: expectedData(), | ||
@@ -60,3 +59,2 @@ size: expectedSize | ||
const uploadedFile = await uploadManager.upload({ | ||
accountId, | ||
data: expectedData | ||
@@ -75,3 +73,2 @@ }); | ||
const uploadedFile = await uploadManager.upload({ | ||
accountId, | ||
data: expectedData | ||
@@ -90,3 +87,2 @@ }); | ||
const uploadedFile = await uploadManager.upload({ | ||
accountId, | ||
data: new buffer.Blob([expectedData], { type: expectedMime }) | ||
@@ -105,3 +101,2 @@ }); | ||
const uploadedFile = await uploadManager.upload({ | ||
accountId, | ||
data: Buffer.from(expectedData, "utf8"), | ||
@@ -121,3 +116,2 @@ mime: expectedMime | ||
const uploadedFile = await uploadManager.upload({ | ||
accountId, | ||
data: Buffer.from(expectedData, "utf8") | ||
@@ -138,3 +132,2 @@ }); | ||
const uploadedFile = await uploadManager.upload({ | ||
accountId, | ||
data: expectedData | ||
@@ -141,0 +134,0 @@ }); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
570671
12796
505