clodynix
Version:
Clodynix is a modern, efficient, and developer-friendly CDN package offering seamless content delivery with an intuitive dashboard and comprehensive documentation. Simplify your content delivery with Clodynix's powerful and scalable platform.
56 lines (40 loc) • 1.19 kB
Markdown
A lightning-fast CDN solution powered by modern technology to deliver your content seamlessly.



```bash
npm install clodynix
yarn add clodynix
pnpm add clodynix
```
```javascript
import { Clodynix } from 'clodynix';
const clodynix = new Clodynix({
apiKey: process.env.ClodynixSecret || '',
});
// Get a file
const file = await clodynix.getFile({ fileId: 'your-file-id' });
// Upload a file
const formData = new FormData();
formData.append('file', someFile);
const createdFile = await clodynix.createFile({ formData });
```
Set your Clodynix secret token as an environment variable:
```bash
export ClodynixSecret=your-secret-token
```
Retrieves a file by ID
- `options.fileId`: string - The ID of the file to retrieve
Uploads a new file
- `options.formData`: FormData - Form data containing the file to upload
MIT © Clodynix Team