{"id":18122,"library":"appcenter-file-upload-client-node","title":"appcenter-file-upload-client-node","description":"File upload client for Visual Studio App Center Distribute, used to upload release binaries to App Center. Current stable version is 1.2.12 (part of appcenter-cli ecosystem). The library slices a binary into 4MB chunks and uploads them in parallel for faster uploads on high-latency connections, with per-chunk retry. Internal dependency for appcenter-cli; not intended for direct use. Ships TypeScript types. Release cadence tied to appcenter-cli (v2.x, v3.x). Differentiator: parallel chunked upload vs single-stream alternatives.","status":"active","version":"1.2.12","language":"javascript","source_language":"en","source_url":"https://github.com/microsoft/appcenter-cli","tags":["javascript","typescript"],"install":[{"cmd":"npm install appcenter-file-upload-client-node","lang":"bash","label":"npm"},{"cmd":"yarn add appcenter-file-upload-client-node","lang":"bash","label":"yarn"},{"cmd":"pnpm add appcenter-file-upload-client-node","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Used for HTTP requests to the upload service","package":"node-fetch","optional":false},{"reason":"Azure Blob Storage SDK for uploading chunks","package":"@azure/storage-blob","optional":false}],"imports":[{"note":"ESM module; named export. Avoid default import.","wrong":"const upload = require('appcenter-file-upload-client-node').upload","symbol":"upload","correct":"import { upload } from 'appcenter-file-upload-client-node'"},{"note":"Named export for the client class. Default import is undefined.","wrong":"import FileUploadClient from 'appcenter-file-upload-client-node'","symbol":"FileUploadClient","correct":"import { FileUploadClient } from 'appcenter-file-upload-client-node'"},{"note":"Type export; internal path may change, always import from package root.","wrong":"import { UploadableAsset } from 'appcenter-file-upload-client-node/lib/UploadableAsset'","symbol":"UploadableAsset","correct":"import { UploadableAsset } from 'appcenter-file-upload-client-node'"}],"quickstart":{"code":"import { upload } from 'appcenter-file-upload-client-node';\n\nasync function main() {\n  const result = await upload({\n    asset: {\n      path: '/path/to/release.apk',\n      version: '1.0.0',\n      versionCode: '1'\n    },\n    ownerName: 'myowner',\n    appName: 'myapp',\n    token: process.env.APPCENTER_TOKEN ?? '',\n    uploadDomain: 'https://upload.appcenter.ms',\n    releaseNotes: 'First release',\n    notifyTesters: false,\n    destinations: [\n      { name: 'Collaborators', isNotifyTesters: true }\n    ]\n  });\n  console.log('Upload succeeded', result);\n}\n\nmain().catch(console.error);","lang":"typescript","description":"Shows how to upload a binary file to App Center using the upload function with necessary parameters and environment variable for token."},"warnings":[{"fix":"Update Node.js to v14 or later.","message":"The minimum node version required is now Node 14 (since v2.14.0) or higher.","severity":"breaking","affected_versions":">=2.14.0"},{"fix":"If you depend on internal types, update to use @azure/storage-blob types.","message":"The library was migrated from @azure/ms-rest-js to @azure/storage-blob in v2.13.7, which changes the internal API for chunk uploading. No external API change, but ensures compatibility with newer Azure SDK.","severity":"breaking","affected_versions":">=2.13.7"},{"fix":"This is an internal change; no action required unless you relied on VM2.","message":"VM2 package was removed in v2.13.10 due to security concerns. This library does not use sandboxing anymore.","severity":"deprecated","affected_versions":">=2.13.10"},{"fix":"Always include `destinations` array with at least one element (e.g., `[{name: 'Collaborators'}]`).","message":"The upload function's `options` parameter is typed as `UploadOptions` but some properties (like `destinations`) are actually required in the App Center API. Missing them may cause silent failure or 400 errors.","severity":"gotcha","affected_versions":"*"},{"fix":"Pass plain text release notes.","message":"The `releaseNotes` option does not support Markdown; plain text only. Using Markdown may cause display issues or truncation.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-25T00:00:00.000Z","next_check":"2026-07-24T00:00:00.000Z","problems":[{"fix":"Ensure you are using Node 14+ and install the package with npm install appcenter-file-upload-client-node, which will pull node-fetch automatically. If using Node 18+ with ESM, node-fetch v3 may be required; consider setting type: 'module' or force resolution.","cause":"node-fetch is an internal dependency of appcenter-file-upload-client-node, but its version may be incompatible with Node version or ESM.","error":"Cannot find module 'node-fetch'"},{"fix":"Always provide destinations as an array, e.g., destinations: [{name: 'Collaborators', isNotifyTesters: true}].","cause":"The destinations option must be an array; passing a string or missing it causes a runtime error.","error":"TypeError: Options.destinations is not iterable"},{"fix":"Regenerate a new token from App Center settings and ensure it is passed correctly in the `token` option (or set as APPCENTER_TOKEN environment variable).","cause":"Invalid or expired App Center API token.","error":"Upload failed with status 401: Unauthorized."},{"fix":"Ensure `asset.path` is an absolute or relative path to an existing binary file.","cause":"The `asset.path` provided is either missing, not a string, or points to a non-existent file.","error":"Error: asset.path must be a valid file path."}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}