Blobs
A blob is an opaque binary object stored on the node — an application bundle
or arbitrary app data. mero.admin covers the full lifecycle; blob bytes are
plain Data.
Upload
Section titled “Upload”let bytes: Data = try Data(contentsOf: fileURL)
let info = try await mero.admin.uploadBlob( UploadBlobRequest(data: bytes, hash: nil, contextId: contextId) // hash & contextId optional)let blobId = info.blobIdThe body is sent as raw application/octet-stream to PUT /admin-api/blobs.
let blobs = try await mero.admin.listBlobs().blobs // [BlobInfo] — blobId, sizeInspect without downloading
Section titled “Inspect without downloading”getBlobInfo issues a HEAD request — size, hash, and MIME type come from the
response headers without transferring the body:
let meta = try await mero.admin.getBlobInfo(blobId)// meta.blobId, meta.size, meta.hash, meta.mimeTypeDownload
Section titled “Download”getBlob returns the raw bytes as Data (the endpoint streams the content, not
JSON):
let data: Data = try await mero.admin.getBlob(blobId)Delete
Section titled “Delete”let result = try await mero.admin.deleteBlob(blobId) // result.deleted