Upload file

Syntax

eueno.upload(input,[opts],metadata)

Example

const Eueno = require('@eueno/lib-node');
const fs = require('fs');

async function example() {
  const eueno = new Eueno({
    endpoint: 'https://v2-developers.eueno.io',
  });
  const file = await fs.readFileSync('1.png');

  const data = await eueno.upload(
    file,
    {
      projectKey: 'project_key',
      key: {
        walletPublicKey: 'public_key_of_user_if_method_encrypt',
        fileEncryptionKey: 'key_encrypt_file'
      },
    },
    {
      projectId: 129,
      filename: '1.png',
      contentLength: 12313,
      contentType: 'image/png',
      method: 'ENCRYPT',
      keepPath: false,
    },
  );
}


example();

Parameters

Properties

opts

key

metadata

Last updated