recordDownload method

  1. @override
Future<DownloadRecord> recordDownload({
  1. required String assetId,
  2. String? clientAddress,
  3. String? userAgent,
  4. String? principalId,
  5. String? providerId,
  6. int? bytesServed,
})
override

Records that the asset with assetId was downloaded, and increments its counter.

Implementation

@override
Future<DownloadRecord> recordDownload({
  required String assetId,
  String? clientAddress,
  String? userAgent,
  String? principalId,
  String? providerId,
  int? bytesServed,
}) async => throw const UnsupportedOperationException(
  'Downloads are recorded by the server as it serves them; a client cannot '
  'record one on its behalf.',
);