MCPcopy Create free account
hub / github.com/GetStream/stream-cli / UploadImage

Function UploadImage

pkg/cmd/chat/utils/fileupload.go:22–24  ·  view source on GitHub ↗
(c *stream.Client, cmd *cobra.Command, chType, chID, userID, filePath string)

Source from the content-addressed store, hash-verified

20}
21
22func UploadImage(c *stream.Client, cmd *cobra.Command, chType, chID, userID, filePath string) (string, error) {
23 return uploadFile(c, cmd, uploadTypeImage, chType, chID, userID, filePath)
24}
25
26func uploadFile(c *stream.Client, cmd *cobra.Command, uploadtype uploadType, chType, chID, userID, filePath string) (string, error) {
27 file, err := os.Open(filePath)

Callers 1

uploadImageCmdFunction · 0.92

Calls 1

uploadFileFunction · 0.85

Tested by

no test coverage detected