comAtprotoRepoUploadBlob function

Future<XRPCResponse<RepoUploadBlobOutput>> comAtprotoRepoUploadBlob({
  1. required Uint8List bytes,
  2. required ServiceContext $ctx,
  3. Map<String, String>? $headers,
  4. Map<String, String>? $parameters,
})

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.

Implementation

Future<XRPCResponse<RepoUploadBlobOutput>> comAtprotoRepoUploadBlob({
  required Uint8List bytes,
  required ServiceContext $ctx,
  Map<String, String>? $headers,
  Map<String, String>? $parameters,
}) async => await $ctx.post(
  ns.comAtprotoRepoUploadBlob,
  headers: {'Content-type': '*/*', ...?$headers},
  parameters: $parameters,
  body: bytes,
  to: const RepoUploadBlobOutputConverter().fromJson,
);