npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ziqx/drive

v0.0.3

Published

SDK for Ziqx Drive upload and sign URL

Readme

@ziqx/drive

Official SDK for Ziqx Drive — generate signed upload URLs and upload files easily.


📄 Official Docs

Features

  • Generate signed URLs for secure file uploads (server-side)
  • Upload files directly from the browser using signed URLs
  • Written in TypeScript with full type safety
  • Easy integration with React, Next.js, or any Node.js backend

Installation

# Using npm
npm install @ziqx/drive

# Using yarn
yarn add @ziqx/drive

Usage

1. Server-side: Generate Signed URLs (ZDrive)

import { ZDrive } from "@ziqx/drive";

async function generateSignedUrl() {
  // Initialize with your Drive credentials
  const drive = new ZDrive("your-drive-key", "your-drive-secret");

  // Generate signed URL for a file
  const signed = await drive.generatePutUrl("example.jpg");

  if (signed.success && signed.url) {
    console.log("✅ Signed URL:", signed.url);
  } else {
    console.error("❌ Error generating URL:", signed.message);
  }
}

generateSignedUrl();

Use this signed URL to upload files directly from the browser.


2. Client-side: Upload Files (ZDriveClient)

import { ZDriveClient } from "@ziqx/drive";

// Example: handling file upload from an <input type="file" />
async function handleUpload(file: File, signedUrl: string) {
  const client = new ZDriveClient();
  const response = await client.uploadFile(signedUrl, file);

  if (response.success) {
    console.log("✅ File uploaded:", response.filename);
  } else {
    console.error("❌ Upload failed:", response.message);
  }
}

// Usage: triggered when user selects a file
const fileInput = document.getElementById("fileInput") as HTMLInputElement;
fileInput.addEventListener("change", async () => {
  if (fileInput.files?.length) {
    // Assume `signedUrl` comes from your backend
    const signedUrl = await fetch("/api/drive/sign-url")
      .then((res) => res.json())
      .then((r) => r.url);
    await handleUpload(fileInput.files[0], signedUrl);
  }
});

Compress Image

const client = new ZDriveClient();
const resizedImage = await client.resizeImage(file);

API

ZDrive

| Method | Description | Parameters | Returns | | ---------------------------------- | --------------------------------- | ----------------------------- | -------------------------- | | generatePutUrl(fileName: string) | Generates a signed URL for a file | fileName — Name of the file | Promise<SignUrlResponse> |


ZDriveClient

| Method | Description | Parameters | Returns | | ------------------------------------------- | ------------------------------------- | ---------------------------------------------------------- | ------------------------- | | uploadFile(uploadUrl: string, file: File) | Uploads a file directly to Ziqx Drive | uploadUrl — Signed URLfile — Browser File object | Promise<UploadResponse> |


Response Types

SignUrlResponse

interface SignUrlResponse {
  success: boolean;
  message: string;
  url?: string;
}

UploadResponse

interface UploadResponse {
  success: boolean;
  message: string;
  filename?: string;
  driveid?: string;
}

Notes

  • ZDrive must be used server-side, as it requires your driveSecret.
  • ZDriveClient must be used in the browser, using signed URLs generated by ZDrive.
  • Ensure your backend never exposes driveSecret to clients.

License

MIT © ZIQX