5.0.3 • Published 1 year ago

@meeco/file-storage-node v5.0.3

Weekly downloads
20
License
ISC
Repository
-
Last release
1 year ago

@meeco/file-storage-node

IMPORTANT: there are many improvements and optimisation planned for this package, it is not recommended to use it except for PoC at this stage.

This file storage code has been seperated out of the main @meeco/sdk to keep it smaller.

Installation

npm install -S @meeco/file-storage-node

Basic Usage

File Upload

const uploadedFile = await largeFileUploadNode(fileConfig.file, environment, {
  data_encryption_key,
  vault_access_token,
});
console.log(uploadedFile);

File Download

const downloadedFile = await fileDownloadNode(
  attachmentId,
  environment,
  {
    data_encryption_key: authConfig.data_encryption_key.key,
    vault_access_token: authConfig.vault_access_token,
  },
  attachmentSlotValueDek,
  this.updateStatus
);
await fs.writeFileSync(outputPath + downloadedFile.fileName, downloadedFile.buffer);

More detailed usage

Please see the detailed usage in the cli project in this repository (specifically ../cli/src/commands/items/attach-file.ts and../cli/src/commands/items/get-attachment.ts)

5.0.4-beta

1 year ago

5.0.3

1 year ago

5.0.1-beta

3 years ago

5.0.1

3 years ago

5.0.0

3 years ago

5.0.0-beta

3 years ago

3.2.1

3 years ago

3.2.1-beta

3 years ago

3.2.0-beta.1

3 years ago

3.2.0-beta

3 years ago

3.1.1

3 years ago

3.1.0

3 years ago

3.1.0-beta

3 years ago

3.0.2-beta

3 years ago

3.0.1-beta

3 years ago

2.2.0-beta

4 years ago

2.1.1

4 years ago

2.1.0

4 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.0.1

4 years ago

0.0.8-beta

4 years ago