appBskyVideoStartUpload function

Future<XRPCResponse<VideoStartUploadOutput>> appBskyVideoStartUpload({
  1. required int sizeBytes,
  2. required String mimeType,
  3. String? name,
  4. int? durationMs,
  5. int? width,
  6. int? height,
  7. required ServiceContext $ctx,
  8. String? $service,
  9. Map<String, String>? $headers,
  10. Map<String, String>? $unknown,
})

Start a multipart video upload. The declared size is exact, while optional media properties are advisory and used only for early failure; the authoritative probe runs asynchronously after upload.

Implementation

Future<XRPCResponse<VideoStartUploadOutput>> appBskyVideoStartUpload({
  required int sizeBytes,
  required String mimeType,
  String? name,
  int? durationMs,
  int? width,
  int? height,
  required ServiceContext $ctx,
  String? $service,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await $ctx.post(
  ns.appBskyVideoStartUpload,
  service: $service,
  headers: {'Content-type': 'application/json', ...?$headers},
  body: {
    ...?$unknown,
    'sizeBytes': sizeBytes,
    'mimeType': mimeType,
    if (name != null) 'name': name,
    if (durationMs != null) 'durationMs': durationMs,
    if (width != null) 'width': width,
    if (height != null) 'height': height,
  },
  to: const VideoStartUploadOutputConverter().fromJson,
);