mintProfileMediaUpload
Adds a file to the profile's media library and returns where to upload its content. The file stays PENDING until it is uploaded and processed, and is shown publicly only after it passes moderation. Requires being signed in and able to edit the profile (an owner or admin member, or a member of a space that manages it).
Arguments
altTextStringImages: alt text, for screen readers.
captionStringDefault caption.
contentTypeStringMIME type of the file. Images:
image/jpeg,image/pngorimage/webp. Audio: a common audio type such asaudio/mpeg.Whether the file is a video, an image or audio.
maxDurationSecondsIntVideos: the longest allowed duration, in seconds. Defaults to 180.
profileIdID!ID of the profile.
sizeBytesBigIntFile size in bytes. Required. Videos up to 5 GB, images up to 10 MB, audio up to 50 MB.
titleStringLabel for the file in the media library.
Returns
ProfileMediaUploadOutput!Example
mutation MintProfileMediaUpload($altText: String, $caption: String, $contentType: String, $kind: ProfileMediaAssetKind!, $maxDurationSeconds: Int, $profileId: ID!, $sizeBytes: BigInt, $title: String) {
mintProfileMediaUpload(
altText: $altText
caption: $caption
contentType: $contentType
kind: $kind
maxDurationSeconds: $maxDurationSeconds
profileId: $profileId
sizeBytes: $sizeBytes
title: $title
) {
asset {
__typename
... on ProfileMediaAudioAsset {
audioUrl
caption
contentType
createdAt
durationMs
id
kind
profileId
}
... on ProfileMediaImageAsset {
caption
createdAt
focalX
focalY
id
kind
photographer
profileId
}
... on ProfileMediaVideoAsset {
caption
createdAt
id
kind
previewEndMs
previewStartMs
profileId
status
}
}
audioUploadTarget {
expiresAt
method
objectKey
uploadUrl
}
imageUploadTarget {
expiresAt
method
objectKey
uploadUrl
}
}
}