chunked_uploader 1.1.0 copy "chunked_uploader: ^1.1.0" to clipboard
chunked_uploader: ^1.1.0 copied to clipboard

An easy-to-use package to upload files in chunks using Dio for mobile, desktop and web.

example/README.md

Example #

final file =
    (await FilePicker.platform.pickFiles(withReadStream: true))!.files.single;
final dio = Dio(BaseOptions(
  baseUrl: 'https://example.com/api',
  headers: {'Authorization': 'Bearer'},
));
final uploader = ChunkedUploader(dio);

// using data stream
final response = await uploader.upload(
  fileName: file.name,
  fileSize: file.size,
  fileDataStream: file.readStream!,
  maxChunkSize: 500000,
  path: '/file',
  onUploadProgress: (progress) => print(progress),
);
// using path
final response = await uploader.uploadUsingFilePath(
  fileName: file.name,
  filePath: file.path!,
  maxChunkSize: 500000,
  path: '/file',
  onUploadProgress: (progress) => print(progress),
);
30
likes
130
pub points
88%
popularity

Publisher

unverified uploader

An easy-to-use package to upload files in chunks using Dio for mobile, desktop and web.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

async, dio, universal_io

More

Packages that depend on chunked_uploader