Upload JS API Library
This library provides a simple and convenient way to upload large files to MapTiler, track progress, and handle errors. You can use it in any JavaScript or TypeScript project. Alternatively, check out other ways to upload your files.
Features
- Multipart file upload support
- Progress tracking with detailed statistics (total file size, uploaded bytes, elapsed time, bitrate, estimated remaining time)
- Error handling and status reporting
- React integration
- TypeScript type safety
- Customizable upload endpoints
- Support for different output types
- Cancel upload functionality
How to use
- Install the library.
- Get your MapTiler service token. You’ll need it for the next step. The token grants access to your MapTiler account and enables the library to upload files on your behalf.
- Implement the Upload API endpoints in your backend.
- Initialize the Upload API endpoints on the client side.
- Try the Next.js example to see how to use the library in practice.
Reference
The reference documents every object, class, type, and method available in the MapTiler Upload JS.
On this page