[英]How to save an image from a link to Firebase storage with firebase web?
In my iOS App I want to display an image of a webcam: https://www.alpenblickzeneggen.ch/fileadmin/user_upload/webcamBild.jpg . 在我的iOS应用中,我想显示网络摄像头的图像: https : //www.alpenblickzeneggen.ch/fileadmin/user_upload/webcamBild.jpg 。
But with iOS 10 and AppTransportSecurity and all those problems I think it's better to do it otherwise: 但是,对于iOS 10和AppTransportSecurity以及所有这些问题,我认为最好还是这样做:
But, how can I do that? 但是,我该怎么办呢? Is it possible?
可能吗?
So long as the site is using reasonably modern ciphers, ATS isn't going to be a problem here... 只要站点使用的是相当现代的密码,ATS在这里就不会成为问题...
If you're already storing your image somewhere else, just use something like SDWebImage to download and display your image: 如果您已经将图像存储在其他位置,则可以使用SDWebImage之类的东西下载并显示图像:
@import SDWebImage
imageView.sd_setImage(with: URL(string: "https://www.alpenblickzeneggen.ch/fileadmin/user_upload/webcamBild.jpg"), placeholderImage: UIImage(named: "placeholder.png"))
If the image is changing, and you need a place to store that data, Firebase Storage is a good choice. 如果图像在变化,并且您需要一个存储数据的地方,Firebase Storage是一个不错的选择。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.