链接到其他应用程序发送文件/映像而不是文本的链接到WhatsApp

发布于 2025-02-03 23:05:40 字数 381 浏览 2 评论 0原文

我想将PDF文件和图像发送到WhatsApp。 下面的方法是文本。我想发送 abc.pdf 而不是 urlendCodedText

<a href="whatsapp://send?text=urlencodedtext">Share this</a>

我想要这个

<a href="whatsapp://send?text=ABC.pdf">Share this</a>
or 
<a href="whatsapp://send?text=image.png">Share this</a>

I want to send PDF file and Image to whatsApp.
below method is for text. I want to send ABC.pdf instead of urlendcodedtext

<a href="whatsapp://send?text=urlencodedtext">Share this</a>

I want this

<a href="whatsapp://send?text=ABC.pdf">Share this</a>
or 
<a href="whatsapp://send?text=image.png">Share this</a>

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

放我走吧 2025-02-10 23:05:40

我这样做。将源文件保存在某个地方,然后在文本中传递URL。

const shareToWhatsApp = () => {
    let newURL = `https://api.whatsapp.com/send?text= https://example.com/files/test-file}`;
    window.open(newURL, "_blank");
  }

I do it in this way. Save the source file somewhere and then pass the URL in text.

const shareToWhatsApp = () => {
    let newURL = `https://api.whatsapp.com/send?text= https://example.com/files/test-file}`;
    window.open(newURL, "_blank");
  }
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文