MCPcopy Create free account
hub / github.com/GetStream/stream-js / process

Method process

src/images.ts:60–71  ·  view source on GitHub ↗

* Generate a diffrent variant of the uploaded image * @link https://getstream.io/activity-feeds/docs/node/files_introduction/?language=js#image_processing * @param {string} uri * @param {ImageProcessOptions} options

(uri: string, options: ImageProcessOptions)

Source from the content-addressed store, hash-verified

58 * @param {ImageProcessOptions} options
59 */
60 process(uri: string, options: ImageProcessOptions) {
61 const params = Object.assign(options, { url: uri });
62 if (Array.isArray(params.crop)) {
63 params.crop = params.crop.join(',');
64 }
65
66 return this.client.get<FileUploadAPIResponse>({
67 url: `images/`,
68 qs: params,
69 token: this.token,
70 });
71 }
72
73 /**
74 * Generate a thumbnail for a given image

Callers 3

thumbnailMethod · 0.95
images.jsFile · 0.80
images_test.jsFile · 0.80

Calls 1

getMethod · 0.45

Tested by

no test coverage detected