최근 검색


최근 검색 없음

Rocky Tennoh's Avatar

Rocky Tennoh

가입한 날짜: 2024년 11월 18일

·

마지막 활동: 2024년 11월 18일

팔로잉

0

팔로워

0

총 활동 수

2

투표 수

0

가입 플랜

1

활동 개요

님의 최근 활동 Rocky Tennoh

Rocky Tennoh님이 에 댓글을 입력함

커뮤니티 댓글 Developer - Zendesk Apps Framework (ZAF)
hello @Tipene Hughes sir 

const file = new File([blobData], mediaData.fileName, {
type: blobData.type,
});
const formData = new FormData();
formData.append("media", file);
formData.append("title", file.name);
formData.append("content_type", file.type);
formData.append("account", spokiAccount?.id);
const metadata = await client.metadata();

 
const sendMedia = await client.request({
url: `${BASE_URL}/media/`,
type: "POST",
dataType: "json",
data: formData,
headers: {
"Content-Type": "multipart/form-data",
X-secret:
typeof metadata.installationId === "string"
? spokiAccessKey
: "{{setting.spokiAccessKey}}",
},
secure: !(typeof metadata.installationId === "string"),
});


"hello Tipene Hughes sir When I pass FormData as the payload in my API call, the media file is not included in the payload when I check the request in the browser's network tab. Why is this happening, and how can I fix it? Also, can you confirm if my code is correct?"
 

 

댓글 보기 · 2024년 11월 18일에 편집됨 · Rocky Tennoh

0

팔로워

0

투표 수

0

댓글