anonfiles 0.2.1 anonfiles: ^0.2.1 copied to clipboard
AnonFiles HTTP client based on uno. Support for AnonFiles, FileChan and LetsUpload.
AnonFiles for Dart #
This is a library for interacting with AnonFiles API related APIs:
Installation #
dependencies:
anonfiles: ^<latest-version>
Import:
import 'package:anonfiles/anonfiles.dart';
Usage #
The usage is pretty straightforward:
final Uint8List bytes = File('example/sample.txt').readAsBytesSync();
const String filename = 'sample.txt';
// https://anonfiles.com/docs/api
print('[AnonFiles]:');
final AnonFiles anonFiles = AnonFiles();
await for (final AnonFileUploadEvent event
in anonFiles.upload(bytes: bytes, filename: filename)) {
print('Event: $event');
}
// https://filechan.org/docs/api
print('[fileChan]:');
final FileChan fileChan = FileChan();
await for (final AnonFileUploadEvent event
in fileChan.upload(bytes: bytes, filename: filename)) {
print('Event: $event');
}
// https://letsupload.cc/docs/api
print('[letsUpload]:');
final LetsUpload letsUpload = LetsUpload();
await for (final AnonFileUploadEvent event
in letsUpload.upload(bytes: bytes, filename: filename)) {
print('Event: $event');
}
Contributing #
TODO.