我们如何从Kotlin的本地存储中获取URL?

发布于 2025-02-12 20:13:25 字数 437 浏览 0 评论 0 原文

我们如何从本地存储中获取URL?我需要发送我从本地存储到服务器选择的图像。我的朋友告诉我从图像中获取URL。我该怎么做?我从事碎片而不是活动。这是我的片段代码: https://codeshare.io/3amwy6 ,这是我的ViewModel代码: https://codeshare.io/lw0xnl 我可以从画廊获得图像,但不能将其发送到我的服务器。我的朋友说,我需要做的是从图像中获取URL。但是我不知道这样做的方法,因为我在科特林很新。谢谢您的回答。

How we can get url from local storage? I need to send the image that I've picked from local storage to server. My friend told me to get url from the image. How can i do that? I work on fragment rather than activity. This is my fragment code: https://codeshare.io/3AMWY6 and this is my viewmodel code: https://codeshare.io/Lw0xnl I can get image from gallery but can't send it to my server. And my friend says that what i need to do is to get the url from the image. But i don't know the way to do it because i new in kotlin. Thank you for answering.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文