azblob 3.0.1 azblob: ^3.0.1 copied to clipboard
A trivial Azure Blob Storage client. You can get and put Blob on server side dart.
import 'dart:convert';
import 'package:azblob/azblob.dart';
main() async {
var storage = AzureStorage.parse('your connection string');
await storage.putBlob(
'/example/yourfile.txt',
body: 'Hello, world.',
contentType: 'text/x-hello',
);
var response = await storage.getBlob('/example/yourfile.txt');
print(response.headers.contentType);
var body = (await response.transform(const Utf8Decoder()).toList()).join();
print(body);
await storage.deleteBlob('/example/yourfile.txt');
storage.close();
}