MediahubPictureUploadedPayload mediahub.picture.uploaded@1

Generated at from openvibe-contracts v0.221.0 and openvibe-sdk v0.65.0.

Version
1.0.0
Owner
media-hub
Visibility
first-party
Status
active
Compatibility
backward
Schema
https://openvibe.network/contracts/events/payloads/mediahub.picture.uploaded.v1.json

mediahub.picture.uploaded v1 (OpenVibe.MediaHub server/pics/service.js): a signed-in person uploaded a picture to OpenVibe.Pics. Pictures are unlisted (reachable only by their link), so the event is internal and carries neither the link nor the title. Written to MediaHub's outbox in the transaction that stores the picture; signed-out uploads emit nothing. OpenVibe.Quest credits the owner's "Share a picture" quest from it. Envelope: source media-hub (namespace mediahub), subject { type: picture, id: <picture id> }, actor the uploader, visibility internal.

Fields

FieldTypeRequiredDescriptionConstraints
picturestringyesThe picture id. Also the envelope subject id.
  • pattern ^pic_[0-9A-HJKMNP-TV-Z]{26}$
owneridentity.subject-refyesThe person who uploaded it.
uploaded_atstringyes
  • format date-time

Examples

From the contract's own test fixtures: valid ones validate, rejected ones must fail.

Valid: first
{
  "picture": "pic_01M516F1WX5NN6C0EMW2V0G8Y9",
  "owner": {
    "type": "user",
    "id": "usr_01J8Z3V9Q6N1X2Y3Z4A5B6C7D8"
  },
  "uploaded_at": "2026-10-16T03:00:00.000Z"
}
Rejected: bad-picture-id
{
  "picture": "Ab234567",
  "owner": {
    "type": "user",
    "id": "usr_01J8Z3V9Q6N1X2Y3Z4A5B6C7D8"
  },
  "uploaded_at": "2026-10-16T03:00:00.000Z"
}
Rejected: with-link
{
  "picture": "pic_01M516F1WX5NN6C0EMW2V0G8Y9",
  "owner": {
    "type": "user",
    "id": "usr_01J8Z3V9Q6N1X2Y3Z4A5B6C7D8"
  },
  "uploaded_at": "2026-10-16T03:00:00.000Z",
  "url": "https://openvibe.pics/i/Ab234567"
}

Validate

const contracts = require('openvibe-contracts');
contracts.validate('mediahub.picture.uploaded@1', value);   // { valid, errors: [{ path, message }] }