1.0.31 • Published 1 year ago

@apexxcloud/sdk-js v1.0.31

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

ApexxCloud SDK for JavaScript

Official JavaScript SDK for ApexxCloud Storage Service.

Installation

npm install @apexxcloud/sdk-js

Quick Start

import ApexxCloud from '@apexxcloud/sdk-js';

const storage = new ApexxCloud({
  baseUrl: 'https://api.apexxcloud.com' // optional
});

// Simple file upload using signed URL
const fileInput = document.querySelector('input[type="file"]');
const file = fileInput.files[0];

try {
  const result = await storage.files.upload(signedUrl, file, {
    onStart: (event) => {
      console.log('Upload started:', event);
    },
    onProgress: (event) => {
      console.log(`Upload progress: ${event.progress}%`);
    },
    onComplete: (event) => {
      console.log('Upload completed:', event);
    },
    onError: (event) => {
      console.error('Upload failed:', event);
    }
  });
} catch (error) {
  console.error('Upload failed:', error);
}

Features

  • Simple file upload with progress tracking
  • Detailed progress and status callbacks
  • Browser compatibility
  • Minimal dependencies

API Reference

File Operations

Upload a File

await storage.files.upload(signedUrl, file, {
  onStart: (event) => {},    // Called when upload begins
  onProgress: (event) => {}, // Called during upload with progress info
  onComplete: (event) => {}, // Called when upload completes successfully
  onError: (event) => {}     // Called if upload fails
});

Configuration Options

OptionTypeRequiredDescription
baseUrlstringNoAPI base URL (defaults to https://api.apexxcloud.com)

License

MIT

1.0.31

1 year ago

1.0.30

1 year ago

1.0.29

1 year ago

1.0.28

1 year ago

1.0.27

1 year ago

1.0.26

1 year ago

1.0.25

1 year ago

1.0.24

1 year ago

1.0.23

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.20

1 year ago

1.0.19

1 year ago

1.0.18

1 year ago

1.0.17

1 year ago

1.0.16

1 year ago

1.0.15

1 year ago

1.0.14

1 year ago

1.0.13

1 year ago

1.0.12

1 year ago

1.0.11

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago