从swiftui中的ftp服务器插入图像

发布于 2025-02-01 02:34:12 字数 1171 浏览 0 评论 0原文

我想通过使用FTP服务器在用SwiftUI编码的应用程序中插入图像,但我看不到如何处理。

目前,我添加了这样的图像:

AsyncImage(url: URL(string: "file:///Users/user/Library/Mobile%20Documents/com~apple~CloudDocs/Soft/apdemo/demo/src/Export/"+graph1+imageId+".png")) { image in
                    image.resizable()
                } placeholder: {
                    ProgressView()
                }
                .frame(width: 1050, height: 75)
                .background(Rectangle().fill(Color.white))
                .border(Color.black, width: 1)

我想要这样的东西:

AsyncImage(url: URL(string: "ftp://user:password@host:port/path")) { image in
                    ...

我已经看过这些帖子,但我真的不明白它是如何工作的。有人有真实的例子吗?

如何下载&显示来自FTP服务器的图像

从FTP服务器下载文件ios应用程序

如何在swift 3

I want to insert an image in my app coded with swiftui by using an ftp server but I don't see how to handle that.

At this moment I add an image like that :

AsyncImage(url: URL(string: "file:///Users/user/Library/Mobile%20Documents/com~apple~CloudDocs/Soft/apdemo/demo/src/Export/"+graph1+imageId+".png")) { image in
                    image.resizable()
                } placeholder: {
                    ProgressView()
                }
                .frame(width: 1050, height: 75)
                .background(Rectangle().fill(Color.white))
                .border(Color.black, width: 1)

And I would like something like that :

AsyncImage(url: URL(string: "ftp://user:password@host:port/path")) { image in
                    ...

I have already seen these post but I don't really understand how does it work. Does someone has any real examples ?

How to download & display an image from ftp server

file downloading from ftp server in iOS application

How to download FTP file in swift 3

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

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

发布评论

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