Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@epilot/file-client

Package Overview
Dependencies
Maintainers
44
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@epilot/file-client

Client library for the epilot File API

latest
Source
npmnpm
Version
1.16.0
Version published
Maintainers
44
Created
Source

@epilot/file-client

CI npm version bundle size License

Client library for epilot File API

Uses openapi-client-axios

Installation

npm install --save @epilot/file-client

Usage

import fs from 'fs';
import { getClient } from '@epilot/file-client';
const fileClient = getClient();

// get upload params
const uploadFileRes = await fileClient.uploadFile(null, { filename: 'document.pdf', mime_type: 'application/pdf' });
const uploadParams = uploadFileRes.data;

// upload file to S3
const file = fs.readFileSync('./document.pdf')
const uploadRes = await fileClient.put(
  uploadParams.upload_url,
  file, 
  { headers: { 'content-type': 'application/json' }}
);

// save file as an entity
const uploadParams = await fileClient.saveFile(
  null,
  { s3ref: uploadParams.s3ref, access_control: 'private' },
);

Documentation

https://docs.epilot.io/docs/files/file-api

Keywords

epilot

FAQs

Package last updated on 19 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts