penguin-file-uploader
v3.0.0
Published
Lightweight SDK for uploading, updating, and deleting files to the Penguin Embrace Resource Server. Compatible with Next.js and Node.js.
Maintainers
Readme
🐧 Penguin File Uploader
A lightweight SDK for uploading, updating, and deleting files to the Penguin Embrace Resource Server.
Built for Next.js and Node.js environments.
🚀 Installation
npm install penguin-file-uploaderExample usage
import { addFile, updateFile, deleteFile } from "penguin-file-uploader";
// Upload a new file
const uploadResult = await addFile("abcdef12345ghij", file);
// Update an existing file
const updateResult = await updateFile("abcdef12345ghij", "12345", file);
// Delete a file
const deleteResult = await deleteFile("abcdef12345ghij", "12345");Example API Response
{
"Return": 1,
"ErrorCode": null,
"ErrorDesc": null,
"IDFileKey": 12345,
"URLToDownload": "https://rs.penguinembrace.com/files/12345"
}