Skip to content

uploadProductPhoto ​

api.uploadProductPhoto(payload) ​

Parameters ​

  • payload UploadProductPhotoPayload

Return ​

Promise<UploadProductPhotoResponse>

Types ​

ts
export type UploadProductPhotoPayload = {
    file: AttachmentSource;
};

export type UploadProductPhotoResponse = {
    normalUrl: string;
    photoId: string;
    finished: number;
    hdUrl: string;
    thumbUrl: string;
    clientFileId: number;
    chunkId: number;
};

Examples ​

ts
import { ThreadType } from "zca-js";

const groupId = "000000000000";

api
    .uploadProductPhoto("./product1.jpg")
    .then(console.log)
    .catch(console.error);