CloudinaryFile class
The recognised file class to be used for this package
Constructors
-
CloudinaryFile.fromByteData(ByteData byteData, {required String identifier, String? publicId, CloudinaryResourceType resourceType = CloudinaryResourceType.Auto, List<
String> ? tags, String? folder, Map<String, dynamic> ? context}) -
Instantiate CloudinaryFile from ByteData
factory
-
CloudinaryFile.fromBytesData(List<
int> bytesData, {required String identifier, String? publicId, CloudinaryResourceType resourceType = CloudinaryResourceType.Auto, List<String> ? tags, String? folder, Map<String, dynamic> ? context}) -
Instantiate CloudinaryFile from ByteData
factory
-
CloudinaryFile.fromFile(String path, {String? publicId, String? identifier, CloudinaryResourceType resourceType = CloudinaryResourceType.Auto, List<
String> ? tags, String? folder, Map<String, dynamic> ? context}) -
Instantiate CloudinaryFile from File path
factory
-
CloudinaryFile.fromUrl(String url, {CloudinaryResourceType resourceType = CloudinaryResourceType.Auto, List<
String> ? tags, String? folder, Map<String, dynamic> ? context}) -
Instantiate CloudinaryFile from an external url
factory
Properties
- byteData → ByteData?
-
The ByteData file to be uploaded
final
-
bytesData
→ List<
int> ? -
The bytes data to be uploaded
final
-
context
→ Map<
String, dynamic> ? -
A pipe-separated list of the key-value pairs of contextual metadata to
attach to an uploaded asset.
final
- filePath → String?
-
The path of the File to be uploaded
final
- fileSize → int
-
no setter
- folder → String?
-
An optional folder name where the uploaded asset will be stored.
The public ID will contain the full path of the uploaded asset,
including the folder name.
final
- fromExternalUrl → bool
-
Determine if initialized from CloudinaryFile.fromUrl
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- identifier → String
-
The file name/path
final
- publicId → String?
-
The file public id which will be used to name the file
final
- resourceType → CloudinaryResourceType
-
The cloudinary resource type to be uploaded
see CloudinaryResourceType.Auto - default,
CloudinaryResourceType.Image,
CloudinaryResourceType.Video,
CloudinaryResourceType.Raw,
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
File tags
final
- url → String?
-
External url
final
Methods
-
createChunks(
int chunksCount, int maxChunkSize) → List< MultipartFile> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toFormData(
{required String uploadPreset}) → Map< String, dynamic> - common function to generate form data Override the default upload preset (when CloudinaryPublic is instantiated) with this one (if specified).
-
toMultipartFile(
) → Future< MultipartFile> -
Convert CloudinaryFile to
MultipartFile
-
toMultipartFileChunked(
int start, int end) → MultipartFile - Convert to multipart with chunked upload
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
fromFutureByteData(
Future< ByteData> byteData, {required String identifier, String? publicId, CloudinaryResourceType resourceType = CloudinaryResourceType.Auto, List<String> ? tags}) → Future<CloudinaryFile> -
Instantiate
CloudinaryFile
from future ByteData