uploadFile method
Uploads a file of resourceType
with fileName
to a folder
in your specified cloudName
filePath
path to the file to upload
fileBytes
byte array of the file to uploaded
resourceType
defaults to CloudinaryResourceType.auto
fileName
is not mandatory, if not specified then a random name will be used
optParams
a Map of optional parameters as defined in https://cloudinary.com/documentation/image_upload_api_reference
Response: Check all the attributes in the CloudinaryResponse to get the information you need... including secureUrl, publicId, etc.
Implementation
@Deprecated('Use [uploadResource] instead')
Future<CloudinaryResponse> uploadFile({
String? filePath,
List<int>? fileBytes,
String? publicId,
String? fileName,
String? folder,
CloudinaryResourceType? resourceType,
Map<String, dynamic>? optParams,
ProgressCallback? progressCallback,
}) =>
uploadResource(CloudinaryUploadResource(
filePath: filePath,
fileBytes: fileBytes,
publicId: publicId,
fileName: fileName,
folder: folder,
resourceType: resourceType,
optParams: optParams,
progressCallback: progressCallback,
));