-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to upload Images #9
Comments
Hi @Wulaowu. Here's a solution:
let formData = new FormData();
formData.append("listing_id", "<listing_id>");
formData.append("image", fs.createReadStream("<path_to_image>"));
let image = (await client.ListingImage.uploadListingImage<IListingImage>(
formData as any,
{
axiosConfig: { headers: formData.getHeaders() },
token: token
}
)).data.results[0]; Unfortunately, we have to cast parameters |
Make sure you provide both correct |
Already, I forgot to upload listing_id just now. I am waiting for v3 to appear |
"Content-Type":"multipart/form-data"
The text was updated successfully, but these errors were encountered: