uploadBlob method

Future<XRPCResponse<UploadBlobOutput>> uploadBlob({
  1. required Uint8List bytes,
  2. Map<String, String>? $unknown,
  3. Map<String, String>? $headers,
  4. PostClient? $client,
})

Upload a new blob, to be referenced from a repository record. The blob will be deleted if it is not referenced within a time window (eg, minutes). Blob restrictions (mimetype, size, etc) are enforced when the reference is created. Requires auth, implemented by PDS.

https://atprotodart.com/docs/lexicons/com/atproto/repo/uploadBlob

Implementation

Future<XRPCResponse<UploadBlobOutput>> uploadBlob({
  required Uint8List bytes,
  Map<String, String>? $unknown,
  Map<String, String>? $headers,
  PostClient? $client,
}) async =>
    await _ctx.post<UploadBlobOutput>(
      ns.comAtprotoRepoUploadBlob,
      headers: $headers,
      body: bytes,
      to: const UploadBlobOutputConverter().fromJson,
      client: $client,
    );