cloudinary_public 0.2.1 cloudinary_public: ^0.2.1 copied to clipboard
This package allows you to upload media files directly to cloudinary, without exposing your apiKey or secretKey.
cloudinary_public #
This package allows you to upload media files directly to cloudinary, without exposing your apiKey or secretKey.
Getting started #
Add the dependency cloudinary_public: ^0.X.X
(find recent version) to your project and start using it:
import 'package:cloudinary_public/cloudinary_public.dart';
Using Image Picker Plugin #
var image = await ImagePicker.pickImage(source: ImageSource.camera);
CloudinaryResponse response = await cloudinary.uploadFile(
file: image,
resourceType: CloudinaryResourceType.Image,
filename: image.path, // optional if cache is false
);
print(response.secureUrl);
Using Multi Image Picker Plugin #
final data = await asset.getByteData();
CloudinaryResponse cloudinaryResponse = await cloudinary.uploadFile(
byteData: data,
resourceType: CloudinaryResourceType.Image,
filename: asset.identifier, // optional if cache is false
);
print(response.secureUrl);