Skip to content

Commit

Permalink
chore: Wip
Browse files Browse the repository at this point in the history
Signed-off-by: sarthakjdev <jsarthak448@gmail.com>
  • Loading branch information
sarthakjdev committed May 28, 2024
1 parent b64df41 commit fd07f52
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/example-chat-bot/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ function init() {

} else if (message.text.data.text.toLowerCase() === 'media') {
const response = await message.client.media.upload({
filePath: '../src/media.png'
filePath: path.resolve(__dirname, '../src/media.png')
})

console.log({ response })
Expand Down
3 changes: 1 addition & 2 deletions packages/wapi.js/src/manager/media/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,7 @@ export class MediaManager extends BaseManager implements MediaManagerInterface {
{
path: `/${this.client.phoneNumberId}/media`,
body: JSON.stringify({
file: params.filePath,
type: mimeType,
file: `@${params.filePath};type=${mimeType}`,
messaging_product: "whatsapp",
}),
method: "POST",
Expand Down

0 comments on commit fd07f52

Please sign in to comment.