#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct RepoUploadBlobOutput {
pub blob: crate::api::Blob,
#[serde(flatten)]
pub extra: std::collections::HashMap<String, serde_json::Value>,
}
pub async fn repo_upload_blob(
client: &crate::xrpc::Client,
body: Vec<u8>,
content_type: &str,
) -> Result<RepoUploadBlobOutput, crate::xrpc::Error> {
let v = client
.procedure_raw("com.atproto.repo.uploadBlob", body, content_type)
.await?;
serde_json::from_value(v).map_err(|e| crate::xrpc::Error::Xrpc {
status: 0,
error: "DeserializationError".to_string(),
message: e.to_string(),
})
}