Flutter image and video upload
Last updated: Jun-30-2025
When using the Flutter SDK, you can use one of several options to upload files directly to Cloudinary without the need for server-side operations or authentication signatures.
Upload options
Upload endpoint
The upload endpoint is https://api.cloudinary.com/v1_1/<CLOUD_NAME>/upload
. To use the endpoint in your application, write a function that calls the Cloudinary upload
endpoint and pass:
- An unsigned upload preset with the upload method options you want to apply for all files
- The file(s) to upload
- Other unsigned upload parameters to apply to the selected files (e.g.
tags
, if needed).
For example:
dependencies:
cloudinary_api: ^<latest_version>
http: ^0.13.5
import 'package:cloudinary_api/uploader/cloudinary_uploader.dart';
import 'package:cloudinary_url_gen/cloudinary.dart';
import 'package:cloudinary_api/src/request/model/uploader_params.dart';
void upload() async {
File file = <your_file>;
Cloudinary cloudinary = Cloudinary.fromCloudName(cloudName: "<your_cloud_name>");
final response = await cloudinary.uploader().upload(
file,
params: UploadParams(uploadPreset: "<your_upload_preset>", type: "raw"),
);
print("Upload success: $response");
}
Upload endpoint video tutorial
Watch this video tutorial to see how to upload images from your Flutter app to Cloudinary using the Upload API:
Tutorial contents
Upload widget
The Upload widget is a ready-made, responsive user interface that enables your users to upload files from a variety of sources directly to Cloudinary. You can customize and embed this UI in a WebView Flutter widget with just a few lines of code.
Check out the following Upload Widget code explorer that you can fork to try out some sample configuration changes:
This code is also available in GitHub.
Code examples
- Code sample: Implement the upload widget.
- CodeSandbox: Upload multiple files using a form in pure JavaScript using the Cloudinary upload endpoint.