Skip to content

About

sample-js-app is a demo application to demonstrate the use of @clouduploader/clouduploader-js sdk

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

CloudUploader JS Sample App

This is a sample application demonstrating how to use the @clouduploader/clouduploader-js package for cloud file uploads.

Installation

The package has already been installed via npm:

npm install @clouduploader/clouduploader-js

Project Structure

sample-js-app/
├── index.js           # Main application file with usage examples
├── package.json       # Project configuration
├── package-lock.json  # Dependency lock file
├── README.md          # This file
└── node_modules/      # Installed packages

Usage

The index.js file contains several example functions:

  1. uploadFile() - Basic file upload
  2. uploadFolder() - Upload whole folder in one go.

Basic Example

const CloudUploader = require('@clouduploader/clouduploader-js');

const uploader = new CloudUploader({
  // Add your configuration here
});

// Upload a file
const result = await uploader.upload('./sample-file.txt');

Getting Started

  1. Configure your CloudUploader credentials in index.js:

    const uploader = new CloudUploader({
      // Add your apiKey, bucket, region, etc.
    });
  2. Uncomment the example function you want to run in the main() function

  3. Run the app:

    node index.js

API Reference

Refer to the official CloudUploader documentation for detailed API usage and configuration options.

Next Steps

  • Integrate the uploader into your application
  • Add error handling and validation
  • Implement progress tracking for large file uploads
  • Add retry logic for failed uploads

License

ISC

About

sample-js-app is a demo application to demonstrate the use of @clouduploader/clouduploader-js sdk

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages