'Insert an image from ftp server in swiftui

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



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source