MediaAsset class final
A catalogued asset, live. A mutating call adopts the server's answer in place and returns this.
Store reference in an entry, never url: a rename or move keeps the reference and can change the URL.
Constructors
- MediaAsset(Transport _transport, MediaAssetRecord _record)
Properties
- blobKey → String
-
no setter
- contentType → String
-
no setter
- createdAt → DateTime
-
no setter
- filename → String
-
no setter
- folder → String
-
no setter
- hash → String
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
no setter
- record → MediaAssetRecord
-
no setter
- reference → String
-
silo://media/<id>.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sizeInBytes → int
-
no setter
- state → MediaState
-
no setter
-
no setter
- updatedAt → DateTime
-
no setter
- url → String
-
no setter
- usageCount → int
-
no setter
Methods
-
delete(
[DeleteOptions options = const DeleteOptions()]) → Future< void> - Refused while an entry references it, unless forced.
-
moveTo(
String folder, [RequestOptions options = const RequestOptions()]) → Future< MediaAsset> -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
refresh(
[RequestOptions options = const RequestOptions()]) → Future< MediaAsset> -
rename(
String filename, [RequestOptions options = const RequestOptions()]) → Future< MediaAsset> -
replace(
MediaReplace input, [RequestOptions options = const RequestOptions()]) → Future< MediaAsset> - Swaps the bytes and keeps the id, reference, URL, filename and folder. Every entry pointing here shows the new file.
-
setTags(
List< String> tags, [RequestOptions options = const RequestOptions()]) → Future<MediaAsset> - Replaces the list; it does not append.
-
toString(
) → String -
A string representation of this object.
inherited
-
usages(
[MediaUsageQuery query = const MediaUsageQuery(), RequestOptions options = const RequestOptions()]) → Future< MediaUsagePage>
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited