Recherches récentes
Pas de recherche récente

Rocky Tennoh
Adhésion le 18 nov. 2024
·
Dernière activité le 18 nov. 2024
Suivis
0
Abonnés
0
Activité totale
2
Votes
0
Abonnement
1
APERÇU DES ACTIVITÉS
BADGES
ARTICLES
PUBLICATIONS
COMMENTAIRES DE LA COMMUNAUTÉ
COMMENTAIRES SUR L’ARTICLE
APERÇU DES ACTIVITÉS
Dernière activité effectuée par Rocky Tennoh
Rocky Tennoh a ajouté un commentaire,
Commentaire de la communauté 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?"
Afficher le commentaire · Modification le 18 nov. 2024 · Rocky Tennoh
0
Abonnés
0
Votes
0
Commentaire