dependencies:
taficloud_flutter: ^0.1.0
import 'package:taficloud_sdk/taficloud_sdk.dart';
final taficloud = Taficloud(apiKey: 'your-api-key');
import 'dart:io';
import 'package:taficloud_sdk/taficloud_sdk.dart';
Future<Media> uploadFile(File file) async {
final response = await taficloud.upload(file: file, fileName: 'myfile.png', folder: 'uploads');
print('Uploaded file URL: ${response.data.url}');
}
import 'dart:convert';
import 'package:taficloud_sdk/taficloud_sdk.dart';
Future<Media> uploadBase64File(String base64String) async {
final response = await taficloud.uploadBase64(file: base64String, fileName: 'myfile.png', folder: 'uploads');
print('Uploaded file URL: ${response.data.url}');
}
Future<MediaMetaData> fetchMediaMetadata(String mediaKey) async {
final response = await taficloud.fetchMediaMetadata(mediaKey: mediaKey);
print('Media Metadata: ${response.data}');
}
Future<MediaMetadata> convertMediaFormat(String mediaKey, String format) async {
final response = await taficloud.convertMedia(mediaKey: mediaKey, format: format);
print('Converted Media URL: ${response.data.url}');
}
import 'dart:io';
Future<Media> mergeFiles(List<File> files) async {
final response = await taficloud.mergeFiles(files: files, fileName: 'merged_file.pdf');
print('Merged file URL: ${response.data.url}');
}
import 'dart:io';
Future<Uint8List> compressImage(File file) async{
final compressedImage = await taficloud.compressImage(File("file.jpg"));
print('Compressed Image URL: ${compressedImage.data.url}');
}