Simplify the integration of File Nest into your applications with the File Nest SDK. This software development kit provides a seamless experience for managing files effortlessly. Dive into a world of hassle-free file management with these enticing features:
const fileNestSDK = require('file-nest-sdk');
// Create a new instance of File Nest SDK
const fileNest = new fileNestSDK({
url: 'https://your-file-nest.com',
hmacKey: 'your-secret-hmac-key',
});
1. File Upload:
const fileBuffer = /* ... your file as a buffer ... */;
const fileId = await fileNest.uploadFile(fileBuffer);
console.log(`File uploaded successfully. ID: ${fileId}`);
2. File Retrieval:
const fileId = 'your-file-id';
const fileData = await fileNest.getFileData(fileId);
console.log('File data retrieved:', fileData);
3. File Deletion:
const fileId = 'your-file-id';
const isDeleted = await fileNest.deleteFile(fileId);
console.log(`File ${isDeleted ? 'deleted' : 'not deleted'}`);
4. Permanent File Deletion:
const fileId = 'your-file-id';
const isDeleted = await fileNest.permanentDeleteFile(fileId);
console.log(`File ${isDeleted ? 'permanently deleted' : 'not permanently deleted'}`);
5. File Restoration:
const fileId = 'your-file-id';
const isRestored = await fileNest.restoreFile(fileId);
console.log(`File ${isRestored ? 'restored' : 'not restored'}`);
-
Effortless Integration: Create an instance, and the SDK handles the configuration details for you.
-
Optimized Security: Encapsulation of HMAC signature details ensures secure interaction with File Nest.
-
Time Saving: Simplified methods reduce development time, allowing you to focus on what matters.
npm install file-nest-sdk
Note: Replace the placeholder values (URL and HMAC key) with those of your File Nest instance.
-
File Nest Repository: File Nest
-
Example Usage Repository: File Nest Usage Example
Important: Currently, only the uploadFile
and getFileData
functions have been tested. Feel free to explore additional functions and contribute to their improvement.