JetBrains Space Help

Uploads

Create upload

post /api/http/uploads

Request a URL that can be used to upload an attachment. An attachment can be uploaded to the URL that is returned, by making a PUT request that has a proper content-type header and the attachment data as the request body. The PUT request returns a string that is an id of the uploaded attachment. The attachment id can be passed to other API methods where this attachment needs to be used. Attachments are available for download at /d/{attachmentId}. The ' storagePrefix ' parameter can be one of file, maps, emoji or attachments. The ' mediaType ' parameter can be omitted for all uploads. For image uploads that need to be resized automatically for specific use, such as chat stickers or emoji, use one of chat-image-attachment, chat-sticker, emoji.

Request arguments

object with fields:

  • storagePrefix: string ( Required )

  • mediaType: string ( Nullable and Optional , defaults to null)

Response

string

Get public url

get /api/http/uploads/chat/public-url/{channel}/{message}/{attachmentId}

Returns a URL that can be used to access attachment file without authentication

Request arguments

channel: string in one of the formats

(Path) ( Required )

message: string in one of the formats

  • externalId: string

  • id: string

(Path) ( Required )

attachmentId: string (Path) ( Required )

Response

string

Get image attachment metadata

get /api/http/uploads/image/{id}

Get meta information for a previously uploaded image

Request arguments

id: string (Path) ( Required )

Last modified: 06 September 2023